当前位置:   article > 正文

git 免密登录/密钥失效/Missing or invalid credentials._git missing or invalid credentials.

git missing or invalid credentials.

issues

Missing or invalid credentials.
应该是原来创建的token过期了,直接执行步骤3即可

1. 创建token并拷贝到github

1. cd ~/.ssh
2. ssh-keygen -t rsa -C 'xxxxx@qq.com'
3. 执行上一命令后会生成一下文件id_rsa和id_rsa.pub,将id_rsa.pub拷贝到github
note:如果.pub文件已经存在,直接拷贝即可
  • 1
  • 2
  • 3
  • 4

2. 免密登录

#设置git 缓存
#默认缓存15分钟
git config --global credential.helper cache
#可以更改默认的密码缓存时限
git config --global credential.helper 'cache --timeout=3600'
  • 1
  • 2
  • 3
  • 4
  • 5

pull时再输入一遍用户名和token以后就不用输入了

references:
https://cloud.tencent.com/developer/article/2235142
https://www.cnblogs.com/convict/p/14888283.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/419538
推荐阅读
相关标签
  

闽ICP备14008679号