Probably you meet the followings when you using vagrant or virtualbox:
vagrant@vagrant:~$ git clone ssh://gerrit.mycompany.com:29418/sample
Cloning into 'sample'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
To solve (if you sure chmod is fine on your .ssh folder and files) you have to send your username also:
GIT_SSH_COMMAND="ssh -o User=MyGodUserName"
vagrant@vagrant:~$ GIT_SSH_COMMAND="ssh -o User=MyGodUserName" git clone ssh://gerrit.mycompany.com:29418/sample
Cloning into 'sample'...
remote: Counting objects: 21, done
remote: Finding sources: 100% (21/21)
remote: Total 18416 (delta 0), reused 18397 (delta 0)
Receiving objects: 100% (18416/18416), 6.63 MiB | 17.91 MiB/s, done.
Resolving deltas: 100% (11663/11663), done.
And now it works like charm.
No comments:
Post a Comment