您的位置:首页 > 理论基础 > 计算机网络

gitbash https git credentials 小乌龟 TortoiseGit 配置备忘

2017-11-07 18:54 477 查看
gitbash https git credentials 小乌龟 TortoiseGit 配置备忘
小乌龟 TortoiseGit

小乌龟配置
关键配置
第1步找到配置

第2步配置htps的证书

第3步配置git账户信息

访问https验证
小乌龟界面验证

gitbash 更新代码

小乌龟创建的配置文件

gitbash https git credentials 小乌龟 TortoiseGit 配置备忘

小乌龟 TortoiseGit

git credentials Docs: https://git-scm.com/docs/gitcredentials

参考官方创建了 .git-credentials 文件,怎么都不生效。遇见好几种错误:

- fatal: unable to access 'https://gitlab.example.org/bi-source/hiveUDF.git/': Couldn't resolve host 'gitlab.example.org'
- fatal: unable to access 'https://gitlab.example.org/bi-source/hiveUDF.git/': The requested URL returned error: 500


最后啊最好,还是用小乌龟才终于解决问题。

小乌龟官网

for 64-bit Windows:TortoiseGit-2.5.0.0-64bit.msi

for 32-bit Windows:TortoiseGit-2.5.0.0-32bit.msi

小乌龟配置

安装就不多说了吧,按照提示一步步点就好了。

关键配置

第1步:找到配置



第2步:配置htps的证书:



第3步:配置git账户信息



访问https验证

小乌龟界面验证

先用小乌龟的界面pull代码,系统会弹出一个用户名密码的输入框,输入自己在https://gitlab.example.org上的用户名密码。

pull代码成功。

gitbash 更新代码

git pull origin master


成功!

小乌龟创建的配置文件

上面设置小乌龟以后,打开gitbash,在用户目录下

cd ~
cat .gitconfig


其内容如下:

[user]
name = bibi
[user]
email = bibi@example.com
[credential "https://gitlab.example.org"]
helper = manager
username = 比比
useHttpPath = true


跟 【git credentials 官方文档】文档的配置有较大差异。但是却是有效的。花了不少时间帮同事配置这个,特写此文档备忘。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息