1.第一個(gè)方法阁猜,在.git目錄中有個(gè)config目錄,在路徑前配置下用戶名和密碼即可笋籽,如下所示:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = http://賬號(hào):'密碼'@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