S
S
sergey19892015-12-14 19:19:49
git
sergey1989, 2015-12-14 19:19:49

Question about SSH key in Bitbucket?

Good day. I have never worked with version control systems before, but this time I need to commit the changes. The person gave a link to the repository (closed). It turned out to clone to the computer without problems, via HTTPS, but it’s impossible to send your files because it requires SSH. Permission denied (public key). fatal: Could not read from remote repository. I can't understand: do I need to generate the key myself or does the repository owner have to send it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Deyashkin, 2015-12-15
@Lobotomist

sim3x and Sergey basically wrote correctly. I will write in more detail.
In order to work with a repository with key authorization, you must have a private key, and on the server where you authorize (in this case, bitbucket) - a public "pair" of this key.
You need to:
1. Generate SSH-2 RSA in puttygen (selected by default). Save it anywhere, including to the `$HOME/.ssh/` folder. ($HOME is the user's home folder). This is the private key, in putty format.
2. Click Conversions -> Export OpenSSH key and save it in the `$HOME/.ssh/` folder with the name `id_rsa`. It's important to save it there and with this name, as this is the default location and the name expected by many programs. It can be changed, but this requires additional gestures.
This will be your private key in OpenSSH format.
In some gui you will need to select the key in the first format, while the console uses the key in the second format.
3. Click save Public key. Save anywhere. I have everything in one folder. This is the file you register with bitbucket.
All. Through git bash you should have access to your repository. Please note that do not share your private keys with anyone. A public can be distributed as much as you want.

S
sim3x, 2015-12-14
@sim3x

Add your public keys to
https://bitbucket.org/account/user/%USERNAME%/ssh-keys/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question