Reputation: 291
I'm trying to push my local git repository to my newly created Bitbucket repository.
What I did:
git init
git remote add origin [email protected]:USERNAME/REPONAME.git
git add .
git commit -m 'Initial commit'
git push -u origin master
Instead of pushing, I receive:
repository does not exist.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
When I cat .git/config
, I can see the correct URL which should be used:
url = ssh://[email protected]/USERNAME/REPONAME.git
I'm not quite sure why this isn't working. I've set up a repository in the same way yesterday and all went fine.
What am I doing wrong?
Upvotes: 1
Views: 97
Reputation: 291
I recently changed my Bitbucket username and when I ran ssh -T [email protected]
in console, it printed my new username. Whenever I changed it back to my previous username, it all worked.
Upvotes: 2