So basically I have a server where I have bitbucket git repository set up. I\'ve been using it for months and now out of the blue sky when I try to pull I get the following erro
Alright, as I am getting the hang of git, I would like to attempt to provide feedback/cherry pick on the easy stuff. The error "can't pull/push from repository" typically happens if the user you are using does not have rights to push to the desired remote git repository. If you are new, this should be your origin.
Check SSH Agent:
Check Remote: you are here because you are certain that git is installed on your machine, and that your present private key has had it's corresponding public key copied into your online git account. But you may be pushing to the wrong location. First check the branch that you are working on, were you pushing the right branch? Type;
git branch
You should see your branches listed with the present branch highlighted or with an asterisk in front of the name. If you wish to be pushing a different branch, check it out and continue. Then, confirm that you have the right url in origin, type;
git remote -v
Use the given output to confirm that you were pushing to the right remote. If not type;
git remote remove
and follow that with
git remote add
this way when you push your code using
git push
Everything should be pushed accordingly.
If after checking the above steps, you find that you are still locked out. Note, I assumed that you have a working internet connection. I would obviously setup git from scratch - not the same as reinstalling it, just setup it up and make sure you note the user setting up, and the passphrase that you are using. You should be fine.
Example URL: git@bitbucket.org:username/repository_name.git