
HTTP/HTTPS
Linux
在Linux环境下使用http/https协议clone/pull GitLab仓库的代码遇到这个问题。以下解决方案也适合GitHub或其他仓库如码云,coding。
解决方案:
-
在home目录下创建
.git-credentials文件vim .git-credentials,输入形如https://{username}:{password}@github.com的配置文本:http://root:1qazroot@192.168.20.149/8090
若有多个,一行一个,:wq保存退出 -
执行命令:
git config --global credential.helper store -
执行命令:
cat ~/.gitconfig,存在如下内容即代表成功:
[credential] helper = store 12
注:使用HTTP/HTTPS协议clone代码时,不需要配置SSH key。
注:所谓的使用HTTP/HTTPS协议,打开.git/config文件,url协议是http/(s):
[remote "origin"]
url = http://git.aaa.com/aaa/aaa.git
fetch = +refs/heads/*:refs/remotes/origin/*
参考:
https://blog.csdn.net/lonelymanontheway/article/details/118107326
https://blog.csdn.net/tsq292978891/article/details/89316612


















![[游戏开发][Unity]出包真机运行花屏(已解决)](https://img-blog.csdnimg.cn/img_convert/bbbb8ec9749c92de6c7533aa3a90750c.png)
