How do I avoid the specification of the username and password at every git push?

前端 未结 18 1770
我在风中等你
我在风中等你 2020-11-28 00:02

I git push my work to a remote Git repository.

Every push will prompt me to input username and password. I would

18条回答
  •  清歌不尽
    2020-11-28 00:39

    My Solution on Windows:

    1. Right click at directory to push and select "Git Bash Here".
    2. ssh-keygen -t rsa (Press enter for all values)
    3. Check terminal for: Your public key has been saved in /c/Users//.ssh/id_rsa.pub
    4. Copy public key from specified file.
    5. Go to your GitHub profile => Settings => SSH and GPG keys => New SSH key => Paste your SSH key there => Save

提交回复
热议问题