Composer to download private GitHub repositories
<p>I cannot download github private repos with composer </p>

<pre><code>php composer.phar update 
</code></pre>

<p>I get the following error</p>

<blockquote>
  <p>The "<a href="https://api.github.com/repos/company/private1" rel="nofollow noreferrer">https://api.github.com/repos/company/private1</a>" file could not be
  downloaded (HTTP/1.1 404 Not Found)</p>
</blockquote>

<p>but i can easily download these private repos using <code>git clone</code></p>

<p>Composer.json</p>

<pre><code>"repositories": [
    {
        "type": "vcs",
        "url": "git@github.com:company/private1.git",
        "options": {
            "ssh2": {
                "username": "githubusername",
                "pubkey_file": "/home/username/.ssh/id_rsa.pub",
                "privkey_file": "/home/username/.ssh/id_rsa"
            }
        }
    },
    {
        "type": "vcs",
        "url": "git@github.com:company/private2.git",
        "options": {
            "ssh2": {
                "username": "githubusername",
                "pubkey_file": "/home/username/.ssh/id_rsa.pub",
                "privkey_file": "/home/username/.ssh/id_rsa"
            }
        }
    }
],

"require": {
    "php": "&gt;=5.4.3",
    "zendframework/zendframework": "&gt;2.1.3",
    "doctrine/mongodb-odm": "dev-master",
    "doctrine/doctrine-mongo-odm-module": "dev-master",
    "company/private": "dev-master",
    "company/private2": "dev-master"
}
</code></pre>

<p>I tried with <a href="https://stackoverflow.com/questions/25400378/using-composer-and-private-repository-on-github-using-vcs-on-build-server">this</a> but it doesnot work</p>

<p>SSH2 PECL is also enabled.</p>

<p>I have also created config file <code>vim ~/home/.ssh/config</code></p>

<p>with the following details </p>

<pre><code>host www.github.com
User githubusername
HostName github.com
IdentityFile /home/username/.ssh/id_rsa
</code></pre>

<p>but still i cannot download the private repos using composer</p>