Reputation: 4547
I am trying to clone a git repository on Mac via ssh. Steps I have followed so far
id_rsa.pub
and shared it with the Admin for access.The file is located at /Users/admin/.ssh
Created a config
file at /Users/admin/.ssh
. The file content is
Host MY_DOMAIN
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
I am running the following command on terminal
git clone git@MY_DOMAIN:android.git
git clone git@MY_DOMAIN:android
and the response I am getting is
Cloning into 'android'...
Enter passphrase for key '/Users/admin/.ssh/id_rsa':
Connection to MY_DOMAIN closed by remote host.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I am bit confused on, if I am following the right approach or is there any issue with access rights.
Upvotes: 2
Views: 202
Reputation: 80629
The first 2 steps should be followed for your own user account, and not for /Users/admin
.
Based on your recent edit, it appears that the issue is not with git configuration, but with your gitolite setup. Currently, your gitolite instance is allowing you access to only one repository, namely testing
as is clear from the following output:
hello onkar, this is git@m running gitolite3 v3.6.2-12-g1c61d57 on git 2.1.4
R W testing
Configure your gitolite-admin repo and allow access to the android
project as well.
Upvotes: 1