最新消息:20210917 已从crifan.com换到crifan.org

【已解决】VSCode集成终端中git每次都询问密码

Git crifan 2040浏览 0评论
VSCode中的继承终端,每次去git,比如
git pull
都弹框询问账号和密码:
去尝试解决。让自己记住密码。
记得之前的GitHub的git仓库,都不会弹框的。
去看看git全局配置:
 cat ~/.gitconfig
[user]
        name = Crifan Li
        email = xxx@gmail.com
[core]
        excludesfile = /Users/crifan/.gitignore_global
        autocrlf = input
        askpass = git-gui--askpass
[difftool "sourcetree"]
        cmd = opendiff \"$LOCAL\" \"$REMOTE\"
        path = 
[mergetool "sourcetree"]
        cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
        trustExitCode = true
[push]
        default = simple
[http]
        postBuffer = 524288000
        proxy = socks5://127.0.0.1:51837
[http "https://gitee.com/"]
        proxy =
[http "https://github.com"]
        proxy = socks5://127.0.0.1:51837
[color]
        ui = auto
注意到有个:
        askpass = git-gui–askpass
估计和这个有关
git 每次输入用户名密码
Git 的使用——提交避免输入用户名和密码 – 知乎 (zhihu.com)
git config --global credential.helper store
即可:
输入了一次用户名和密码后,第二次无需再输入:
【总结】
git中每次都要输入用户名和密码
解决办法:让记住密码
操作步骤:
git config --global credential.helper store
即可。

转载请注明:在路上 » 【已解决】VSCode集成终端中git每次都询问密码

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.179 seconds, using 23.37MB memory