git - 为什么 LFS git 的 git push 问密码 3 次?

标签 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 

最佳答案

试试这个:

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

Host *
  AddKeysToAgent yes
  UseKeychain yes

启动您的 ssh 代理:

eval "$(ssh-agent -s)"

然后添加你的 key :

ssh-add ~/.ssh/id_rsa

请注意您的 key 可以以不同的方式命名。

关于git - 为什么 LFS git 的 git push 问密码 3 次?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43371608/

相关文章:

git - 如何列出所有更改文件数的 pull 请求

python - 为什么python pandas dataFrame的内存消耗这么大?

python - 读取 tarfile 内的大文件头 (~9GB),无需完全提取

c - fread 是否对大文件失败?

python - GitHub 从 raw.githubusercontent 获取存储库中所有文件的列表?

Android Studio 不断向 GitHub 添加额外的文件

Git LFS - 如何从 git 存储库中删除旧版本的文件?

php - 在 PHP 中处理大型 XML 的最佳方式

c# - 如何从文本文件中读取数百万行并快速插入到表中

ios - Amazon Web Service (AWS) S3,如何上传受密码保护的文件夹?