uma
uma

Reputation: 1577

Cannot access remote machine git repository

My friend and I work on different branches in a bit-bucket repository and then we merge to one branch. And my friend clones the master branch to our server.

Now, only he can pull and push that remote machine repository. I also login using ssh, but I couldn't do pull and push. When I type pull, I show, my friend git link to type password.

I am also admin of the bit-bucket repository. Please, hope someone help.

I also create my global user and give global email to git repository, but still not change anything.

Upvotes: 1

Views: 535

Answers (1)

VonC
VonC

Reputation: 1323803

I also , login ssh when I type Pull , I show , my friend git link to type password

Since it is an ssh url, that means it search by default for the private/public ssh keys in ~/.ssh/id_rsa.

If you are both logged in with the same user, that key is the same.

Make sure you don't use the same account, or, if you do, add in ~/.ssh a config file which can reference two sets of ssh keys (with two public keys registered on the Bitbucket repo).
See this question as an example.

Upvotes: 1

Related Questions