打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
lLinux服务器git pull/push时提示输入账号密码之免除设置

https://www.cnblogs.com/huanhang/p/7470741.html

1、先cd到根目录,执行git config --global credential.helper store命令

[root@iZ25mi9h7ayZ ~]# git config --global credential.helper store

2、执行之后会在.gitconfig文件中多加红色字体项

[user]        name = 天明        email = xxxx@xxxx.com[credential]        helper = store

3、之后cd到项目目录,执行git pull命令,会提示输入账号密码。输完这一次以后就不再需要,并且会在根目录生成一个.git-credentials文件

[root@iZ25mi9h7ayZ test]# git pullUsername for 'https://git.oschina.net': xxxx@xxxx.comPassword for 'https://xxxx@xxxx.com@git.oschina.net':
[root@iZ25mi9h7ayZ ~]# cat .git-credentialshttps://Username:Password@git.oschina.net
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Git默认用户名和密码设置
Android Studio项目用Git上传至码云(OSChina)
git常用命令
Windows下Git多账号配置,同一电脑多个ssh
git bash 常用命令
解决git爆错2018
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服