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

前端 未结 18 1784
我在风中等你
我在风中等你 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:38

    On Windows operating system use this instead, this works for me:

    https://{Username}:{Password}@github.com/{Username}/{repo}.git
    

    e.g.

    git clone https://{Username}:{Password}@github.com/{Username}/{repo}.git
    
    git pull https://{Username}:{Password}@github.com/{Username}/{repo}.git
    
    git remote add origin https://{Username}:{Password}@github.com/{Username}/{repo}.git
    
    git push origin master
    

提交回复
热议问题