Sourcetree 每次拉取提交都需要输入密码

Sourcetree 每次拉取提交都需要输入密码

 

方法1:在.git目录中有个config目录,在路径前配置下用户名和密码

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = http://账号:'密码'@192.168.10.7:8090/test/Django.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master


方法2:设置对所有项目有效

git config --global credential.helper osxkeychain #第一次需要输入密码,以后都不需要了,
// git config --global credential.helper store #store 存储磁盘模式

 

posted @ 2019-08-31 23:37  Kaymin  阅读(398)  评论(0)    收藏  举报