1

I'm wondering if someone has ever experienced of pushing the codes from a remote server to bitbucket.

My remote server is CentOS and i have an existing codes in there. I logged on to my remote server using putty and I think i managed to set up a git repo there by executing the command below

git init
git remote add origin git@bitbucket.org:my_username/my_git_repo.git
git add .
git commit -m "initial commit"

but when i tried to execute

git push -u origin master

An error saying "Permission denied (public key)".

Hopefully someone could point me to the right direction here. Thanks

Norks
  • 390
  • 1
  • 5
  • 18

1 Answers1

1

Note that if you don't want to deal with ssh public/private keys generation and management, you can switch to an https url:

cd /path/to/my_git_repo
git remote set-url https://yourLogin@bitbucket.org/yourLogin/my_git_repo.git

You would then be asked for your BitBucket account password.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250