Reputation: 287
So I tried to create a new Project at bitbucket and Import my current stuff.
Step 1: Switch to your repository's directory
cd /path/to/your/repo
Step 2: Connect your existing repository to Bitbucket
git remote add origin ssh://[email protected]/KevinSpence/app.git
git push -u origin master
After
git push -u origin master
I got this error:
$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What am I doing wrong, (it is not my first Project on bitbucket)
Upvotes: 0
Views: 406
Reputation: 1126
It sounds like you don't have your ssh key setup correctly. Follow this to setup an ssh key: https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
As somebody else already commented, this page can help you troubleshoot further: https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html
If that still doesn't help, you might opt to add your remote to git using https instead of ssh. Bitbucket should have a drop-down under clone to pick between https and ssh
Upvotes: 1