Git on Bitbucket: Always asked for password, even after uploading my public SSH key

前端 未结 15 1390
情书的邮戳
情书的邮戳 2020-12-22 17:32

I uploaded my ~/.ssh/id_rsa.pub to Bitbucket\'s SSH keys as explained, but Git still asks me for my password at every operation (such as git pull).

15条回答
  •  难免孤独
    2020-12-22 18:06

    Actually, none of these answers reflect current state of the art with Git (v2.29 by time of writing this answer). In the latest versions of Git, cache, winstore, wincred are deprecated.


    If you want to clone a Bitbucket repository via HTTPS, e.g.

    git clone https://Kutlime@bitbucket.org/SomeOrganization/SomeRepo.git

    You have to:

    1. Generate app password at Bitbucket user administration.
    2. Setup your credential method in .gitconfig accordingly (global or local)
    [credential]
        helper = manager
    

    You can locate your .gitconfig by executing this command.

    git config --list --show-origin
    
    1. Execute
    git clone https://Kutlime@bitbucket.org/SomeOrganization/SomeRepo.git
    

    and wait until log on window appears. Use your user name from the url (kutlime in my case) and your generated app password as a password.

提交回复
热议问题