zjfjava

有三种方式解决git clone时每次都需要输入用户名和密码,

1. SSH免密方式

使用git bash ssh-keygen或puttygen.exe生成公钥。

2. 配置全局开机存储认证信息

下面命令会将下次弹框的账号和密码保存起来,永久使用。

git config --global credential.helper store

如果想要清除该账号和密码,使用如下命令:

git config --global credential.helper reset

想要临时存储(默认15min),使用如下命令

git config --global credential.helper cache

windows下的临时存储命令不是上面的,应该使用下面的命令

git config --global credential.helper wincred

3. 地址中携带用户信息

在https链接里加入username:password。

git remote add origin https://username:password@xxx.git 

 

分类:

技术点:

相关文章:

  • 2021-08-30
  • 2021-07-26
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
猜你喜欢
  • 2021-04-29
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-11-14
相关资源
相似解决方案