Setting up SSH keys for Bitbucket on Windows

后端 未结 7 1470
死守一世寂寞
死守一世寂寞 2021-02-05 12:35

First, I am an absolute noob with git, repos and command line. I have repo on Bitbucket and I basically want to be able to push to the repository via gitbash without entering a

7条回答
  •  抹茶落季
    2021-02-05 12:56

    For Windows 7 users:

    1. Open Git Bash and type ssh-keygen, and press Enter three times (one for location, and two for empty passphrase).
    2. Now, a dir .ssh should list these two files: id_rsa id_rsa.pub
    3. Add the public key to your Bitbucket settings, as described in Set up an SSH key , Step 3. You basically copy paste the contents of file "id_rsa.pub" to your profile in BitBucket via the web interface (no admin rights required of course).
    4. Restart Git Bash.
    5. Go the destination directory, where you would like to clone your repository and do a git init
    6. Get the ssh from the Clone of the repo, and then do git clone ssh://git@bitbucket.test.com:YOURUSERNAME/myrepository.git

提交回复
热议问题