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 [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

5
  • You have to add your centos ssh public key to bitbucket Commented Aug 1, 2014 at 5:37
  • Check this out stackoverflow.com/questions/3828164/… Commented Aug 1, 2014 at 5:55
  • If you dont have one check githubs tutorial about making one help.github.com/articles/generating-ssh-keys Commented Aug 1, 2014 at 5:57
  • There will be similar questions in stackoverflow too. Commented Aug 1, 2014 at 5:57
  • You are welcome. I will put in an answer later on. Commented Aug 1, 2014 at 6:19

1 Answer 1

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://[email protected]/yourLogin/my_git_repo.git

You would then be asked for your BitBucket account password.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.