Git always ask passphrase for key

前端 未结 2 519
半阙折子戏
半阙折子戏 2021-01-30 02:25

I had a problem when using git at times.

When I use the command git pull origin my_branch or git fetch or git push origin my

2条回答
  •  不要未来只要你来
    2021-01-30 03:18

    It's because your private SSH key is protected using a passphrase. You can remove it using this command (not recommended since anyone could copy your key and use it to access your repos/account):

    $ ssh-keygen -p
    Enter file in which the key is (/path/to/your/.ssh/key):
    

    enter your current passphrase when prompted here:

    Enter old passphrase:
    Key has comment 'rsa w/o comment'
    

    leave empty if you want to remove the passphrase when prompted here:

    Enter new passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved with the new passphrase.
    

提交回复
热议问题