网站首页 » 其它 » Mac 下 SourceTree 每次push提示输入密码

Mac 下 SourceTree 每次push提示输入密码

August 14, 2021 其它

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

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = http://username:[email protected]/test.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

2.第二种方法,终端输入一下命令:

git config --global credential.helper osxkeychain