码云保存用户名和密码,避免每次clone都要输入
前提
此方法只适合于使用 码云
的用户,github
的用户,或有略微的不同
步骤
1. 先创建一个文件,文件名如下:
touch .git-credentials
2. 使用 vim 打开后,记录如下命令,并保存
https://username:password@github.com # github的用法
https://username:password@gitee.com # 码云的用法
username:password 分别为你个人的用户名和密码,非固定字段;
3. 将该文件永久保存
git config --global credential.helper store # store为永久存储