在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式:

ame@zhenyun ~ $touch .git-credentials

ame@zhenyun ~ $vim .git-credentials

在里面按“i”然后输入:https://{username}:{password}@github.com

比如 https://aoeddklj:1233ds@github.com

2. 在终端下执行

ame@zhenyun ~ $git config --global credential.helper store

3. 可以看到~/.gitconfig文件,会多了一项:

[credential]

helper = store

这个时候输入命令git clone http://username@url 时不需要输入密码,即可完成代码的git

相关文章:

  • 2022-01-17
  • 2021-12-09
  • 2022-12-23
  • 2022-02-02
  • 2021-12-09
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案