Reputation: 410
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 [email protected]: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
Upvotes: 1
Views: 491
Reputation: 1329682
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://[email protected]/yourLogin/my_git_repo.git
You would then be asked for your BitBucket account password.
Upvotes: 1