简体   繁体   中英

How to push a local repo to bitbucket?

I have my repo online at bitbucket, I have created the ssh key using:

ssh-keygen

And I've used the resulted key as a deployment key for the online repo. Then, at source-tree I have added the generated key, but when I push the repo, I get this error:

Pushing to git@bitbucket.org:xxxxx/xxxxxx.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.




Completed with errors, see above.

So, what is still missing?

As mentioned in this answer , setting a "deployment key" would give you read-only access only: a push would never work.

You need to add your public key ($HOME/.ssh/id_rsa) to your BitBucket account.
See " How to install a public key on your Bitbucket account "

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM