logseq-plugin-git icon indicating copy to clipboard operation
logseq-plugin-git copied to clipboard

commit&push时出现“Git push failed fatal: could not read Username for 'https://gitee.com': Device not configured”,在文件夹里手动push却能成功,请问可能是什么问题呢?

Open jackyan0715 opened this issue 2 years ago • 4 comments

commit&push时出现“Git push failed fatal: could not read Username for 'https://gitee.com': Device not configured”,在文件夹里手动push却能成功,请问可能是什么问题呢?

jackyan0715 avatar Sep 21 '23 07:09 jackyan0715

我也是同样的问题。想不明白怎么回事。现在都是靠在iterm里面手动push。

howie-serious avatar Oct 10 '23 06:10 howie-serious

+1,求解决方案!Looking for solutions!

hswsp avatar Oct 23 '23 16:10 hswsp

目前找到一个貌似可行的方案:

  1. 设置credential.helper: git config --global credential.helper store
  2. 此时可以push了,但是国内命令行push会被443 cannot connect。用各位的手段保证命令行能提交就行了。比如:
    1. 梯子
    2. 解决缓存污染:完美优化Github访问缓慢问题 或者 解决DNS污染问题,例如github访问慢,无法clone,微软账户登录慢等

另一个同样的issue也有解决方案:issue #17

hswsp avatar Oct 24 '23 03:10 hswsp

参考 https://github.com/haydenull/logseq-plugin-git/issues/17#issuecomment-1493327019

准备令牌,使用 ssh 连接,可以设置库的上游。

git remote set-url origin https://[token]@github.com/[username]/[repo_name].git

不同的系统使用令牌的方式不同,参照 GitHub 文档。

Generating a new SSH key and adding it to the ssh-agent 生成新的 SSH 密钥并将其添加到 ssh-agent

GOWxx avatar Nov 30 '23 18:11 GOWxx