Why did my ginger garlic paste have a bitter aftertaste? I cooked a base for indian sauce based on lots of onion, homemade ginger garlic paste, some veggies (I used carrot, a little napa cabbage, bell peppers) and spices. After cooking, the sauce had an unfortunate bitter aftertaste. Nothing burned, I cooked over careful heat.

First I thought it wasn't cooked enough, so I cooked some more over low heat. The bitter taste did not disappear.

After considering this some more, my suspicion turned to my homemade ginger garlic paste. It turned green after grinding the ginger and garlic, but that didn't bother me, it's a fairly common phenomenon. But I fried some paste in two batches, and then tasted the result. One was fried until it browned. The other was just fried for 2-3 minutes, and remained quite green. Here's a picture showing (clockwise from lower right) raw, lightly cooked and browned ginger garlic paste:



The browned batch was sweet, followed by the pungent ginger. The lightly fried batch was quite bitter, and also pungent. 

So I think the bitterness in my sauce was caused by my ginger garlic paste. But why? What happened?
I see three possibilities based on what you've said:


the germ of the garlic. The germ, or new sprout of the garlic, should be removed before cooking. If your garlic had started to sprout and especially if you left in the germ, this is a possible cause of the bitterness. 
acid. Cooking garlic in an acid environment can cause chemical changes in the garlic, such as turning blue-green or bitter -- as in your picture. Ginger and onions might even be enough to trigger this, or other components of the dish. 
over-cooking the garlic. Though you said you were careful with heat, it's easy to burn garlic just enough to make it bitter.