在~/下, touch创建文件 .git-credentials, 用vi编辑此文件,输入内容格式:
touch .git-credentials
vi .git-credentials
输入:https://{username}:{password}@github.com
http://登录用户名:登录密码@192.168.0.1:8080/common/front.git
然后再输入下面的命令
git config --global credential.helper store
这个时候输入命令git clone http://username@url 时不需要输入密码,即可完成代码的git

该博客介绍了如何在Linux环境下通过`touch`和`vi`创建并编辑`.git-credentials`文件,以存储GitHub及自定义Git仓库的用户名和密码。之后,通过`git config --global credential.helper store`命令使得Git在执行`git clone`时不需再次输入密码。这样可以简化代码克隆流程,提高开发效率。

被折叠的 条评论
为什么被折叠?



