Linux之解决每次git pull/git push都需输入密码设置

操作命令:

//执行这两条命令
cd / git config --global credential.helper store

执行完命令之后会在.gitconfig文件中多加红色字体

[user]
        name = your name
        email = your email
[credential]
        helper = store

使用:

  cd到项目目录,执行git pull,会提示输入账号密码。输完这一次以后git pull或git push就不在需要输入密码了(会在根目录生成一个 .git-credentials 文件)

posted @   石三爷  阅读(493)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示