To check, navigate to your home directory (e.g., \users\username
in MS-Windows, ~
in Unix/Linux) and see if you have
an .ssh
directory/folder (note the period) that contains
the files id_rsa
(the private key) and id_rsa.pub
(the public key).
If you have these files then you do not need to create a key-pair.
In Unix/Linux and OS X, the ssh-keygen utility is available from the
"normal" BASH shell. In MS-Windows, the CMD shell does not have an
ssh-keygen utility so you need to use the MSYS/MINGW shell instead (or the PuTTY Key Generator).
If you've installed MSYS/MINGW independently, you know how to start the shell.
If not, but you've installed Aptana Studio, you can start the shell by
navigating to
/Users/username/Documents/Aptana Studio 3 Workspace/.metadata/.plugins/com.aptana.portablegit.win32
(where username is your
username on your computer) and clicking on git-bash.bat
.
Now, enter the command:
ssh-keygen -t rsa -C "Generated date"
where date is the date. (Note: The -C flag is a comment.)
Press
cat ~/.ssh/id_rsa.pub
. You can then
click and drag and copy the key to the clipboard. (In MS-Windows
right-click on the title bar and pull down
to Edit-Mark to start the process.)
In OS X you can copy your public key to the clipboard using the
command pbcopy < ~/.ssh/id_rsa.pub
.
cat ~/.ssh/id_rsa.pub
)
into the Key field.
Finally, click on Add.
ssh git@bitbucket.com
and entering your passphrase.
You should get a message that indicates that the
authentication worked but that you don't have shell access.
To get the URL of the repository, click on Overview and
get started and "I have an existing project to push up".
The URL will be in the git remote add origin
command.
Copyright 2019