title: Installing git through .ebextensions on Elastic Beanstalk
body: <p>I'm getting an error deploying to Elastic Beanstalk, because there is no git on the instance. One of the dependencies in my package.json is dependant on a git repository and needs to <code>git clone</code>.
  Git is not installed on the instances. I tried installing it through .ebextensions .conf file while deploying, through <code>yum</code>, but when I ssh into the instance it's not there.</p>
  
  <p><strong>Question is: what is the correct way to install and have git on a Linux instance running on Elastic Beanstalk before <code>npm install</code> is called on that instance?</strong></p>
  
  <p>Here's the log showing the error:</p>
  
  <pre><code>[2015-04-18T09:00:02.815Z] ERROR [1777]  : Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
  caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
    npm WARN package.json amity-api-v2@2.0.0 No repository field.
    npm WARN package.json amity-api-v2@2.0.0 No README data
    npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/awslabs/dynamodb-document-js-sdk) undefined
    npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/awslabs/dynamodb-document-js-sdk) undefined
    npm ERR! git clone https://github.com/awslabs/dynamodb-document-js-sdk undefined
    npm ERR! git clone https://github.com/awslabs/dynamodb-document-js-sdk undefined
    npm ERR! Linux 3.14.35-28.38.amzn1.x86_64
    npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v0.12.0-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v0.12.0-linux-x64/bin/npm" "--production" "install"
    npm ERR! node v0.12.0
    npm ERR! npm  v2.5.1
    npm ERR! code ENOGIT
  
    npm ERR! not found: git
    npm ERR!
    npm ERR! Failed using git.
    npm ERR! This is most likely not a problem with npm itself.
    npm ERR! Please check if you have git installed and in your PATH.
  </code></pre>