首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么git推送LFS git询问密码3次?

为什么git推送LFS git询问密码3次?
EN

Stack Overflow用户
提问于 2017-04-12 21:54:31
回答 2查看 1.2K关注 0票数 3

我在LFS模式下使用标准的github.com存储库,它工作得很好……但总是,当我推送时,会发生这个3xLogin:

代码语言:javascript
复制
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 
EN

回答 2

Stack Overflow用户

发布于 2019-09-28 05:29:16

试试这个:

将此代码添加到~/.ssh/config文件中。

代码语言:javascript
复制
Host *
  AddKeysToAgent yes
  UseKeychain yes

启动ssh代理:

代码语言:javascript
复制
eval "$(ssh-agent -s)"

然后添加你的密钥:

代码语言:javascript
复制
ssh-add ~/.ssh/id_rsa

请注意,您的密钥可以命名为不同的名称。

票数 1
EN

Stack Overflow用户

发布于 2020-01-31 03:35:04

缓存密码为避免这种情况,您还可以自定义time.visit链接:https://help.github.com/en/github/using-git/caching-your-github-password-in-git

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43371608

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档