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

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

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

小乌龟配置

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

关键配置

第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 官方文档】文档的配置有较大差异。但是却是有效的。花了不少时间帮同事配置这个,特写此文档备忘。

我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=3ckgexxns8g0o

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值