How can I color a Banana? Ok, so, as a complete beginner with Blender, I've been trying to create a banana. 

Here is the basic model :



I ,then, applied a basic yellow color to the mesh :



And now I am trying to add some sort of gradient "yellow to green" effect on the extremities of the mesh (as shown in this reference photo) : 



But I have no idea on how I can do that. I've tried to play with the node editor, using a Gradient texture node, followed by a Color Ramp node, but the best thing I could get was that : 



As you can see, It is applying only to one side of the mesh, and It is not even rotated properly to fit the shape of the object. 

Am I on the right way to solve the problem ? Or should I perhaps simply try to UV Unwrap and apply a texture to it ?

Thank you for your answers
Your approach is conceptually correct, you are only missing texture coordinates.

You can even skip the gradient texture and use raw UVs.

The most accurate method is to unwrap you mesh and make a proper UV map, but if you want to skip it, since the banana is an elongated almost-linear shape you can approximate it by using basic Generated texture coordinates.

They won't be as accurate as a proper manual UV mapping, but may do a passable job with less work.

Just use a Converter > Separate XYZ node to get the Y component of your Generated texture coordinates, then run those through the color ramp.