为什么 LFS git 的 git Push 询问密码 3 次?

Pet*_*uss 5 git large-files

我在 LFS 模式下使用标准 github.com 存储库,并且工作正常...但总是,当我推送时,会发生此 3xLogin:

git push
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com': 
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com': 
Locking support detected on remote "origin". Consider enabling it with:
  $ git config 'lfs.https://github.com/xpto-org/xpto-prj.git/info/lfs.locksverify' true
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com': 

Git LFS: (0 of 1 files) 3.38 MB / 925.18 MB 
Run Code Online (Sandbox Code Playgroud)

Zig*_*ive 1

尝试这个:

将其添加到您的~/.ssh/config文件中。

Host *
  AddKeysToAgent yes
  UseKeychain yes
Run Code Online (Sandbox Code Playgroud)

启动你的 ssh 代理:

eval "$(ssh-agent -s)"
Run Code Online (Sandbox Code Playgroud)

然后添加你的密钥:

ssh-add ~/.ssh/id_rsa
Run Code Online (Sandbox Code Playgroud)

请注意,您的密钥可能会以不同的方式命名。