首页 > 其他 > 详细

'git push' always needs password and username

时间:2018-07-01 10:12:56      阅读:226      评论:0      收藏:0      [点我收藏+]

Refer to :

https://help.github.com/articles/caching-your-github-password-in-git/

https://help.github.com/articles/why-is-git-always-asking-for-my-password/

 

If Git prompts you for a username and password every time you try to interact with GitHub, you‘re probably using the HTTPS clone URL for your repository.

Using an HTTPS remote URL has some advantages: it‘s easier to set up than SSH, and usually works through strict firewalls and proxies. However, it also prompts you to enter your GitHub credentials every time you pull or push a repository.

 

Caching your GitHub password in Git

Turn on the credential helper so that Git will save your password in memory for some time. By default, Git will cache your password for 15 minutes.

  1. In Terminal, enter the following:

    git config --global credential.helper cache
    # Set git to use the credential memory cache
    
  2. To change the default password cache timeout, enter the following:

    git config --global credential.helper ‘cache --timeout=3600‘
    # Set the cache to timeout after 1 hour (setting is in seconds)
    

'git push' always needs password and username

原文:https://www.cnblogs.com/quinn-yann/p/9249250.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!