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
网友评论