Hi I am using git for a while now however I am new to enterprise git. here
Is what I did with my test-repo
I created a ssh key pair and added public key to my test repo as deploy key. Now I can clone my test-repo
from ssh
and https
however when I add someone as collabrator they're able to clone repo from https
but not from ssh
ssh-keygen -b 4096 -t rsa -f example_rsa -P "" -C ""
$ ls
example_rsa example_rsa.pub
$ git clone git@git.example-private.com:star/test-repo.git
Cloning into 'test-repo'...
Warning: Permanently added the ECDSA host key for IP address '10.0.1.100' to the list of known hosts.
warning: You appear to have cloned an empty repository.
Same git repo can't be accessed by user even after granting access via ssh however user can git clone the repo using https
.
git clone git@git.example-private.com:star/test-repo.git
Cloning into 'test-repo'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
git clone https://git.example-private.com/star/test-repo.git
Cloning into 'test-repo'...
warning: You appear to have cloned an empty repository.