Setting up SSH keys for Bitbucket on Windows

后端 未结 7 1496
死守一世寂寞
死守一世寂寞 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:55

    There are two ways to load a remote git repository: using SSH and using HTTPS.

    SSH will use a key pair, and requires the public key to be added to your BitBucket/GitHub profile.

    HTTPS requires your BitBucket/GitHub username and password. You will be promoted for your password every time you interact with the remote server (clone, fetch, push, pull).

    If you are currently being prompted for a password, that means the remote URL is currently set to use HTTPS. You can determine this be running git remote -v. To change to use SSH, you need to update the remote URL to the SSH URL by running git remote set-url . If you only have one remote server, will be origin. You can find the SSH URL in BitBucket/GitHub under the clone option of the repository.

提交回复
热议问题