繁体   English   中英

不想在每次 git 拉/推操作提示时输入密码 git

[英]Don't want to enter the password on git prompt for each and every git pull/push operation

基本上我正在尝试执行 git 操作,即 git pull/git push to https:// from Git bash 并且不想一次又一次地输入密码询问提示。

但是我无法在我的 windows 10 操作系统机器上解决这个问题。

我尝试过的事情

  • 使用 git 版本 3.29.0,我观察到 Git 凭据管理器 (GCM) 要求提示每个 git pull./push
  • 根据许多堆栈溢出帖子,我尝试将 git 版本 3.29.0 降级到 3.28.1,这样 Git 凭证管理器就不会要求每个 git 拉/推密码
    • 但是,在将 git 版本降级到 3.28.0 时,现在我从“Git for Windows”获取密码提示

我想绕过为每个 git 拉/推输入密码。

使用 git 版本 3.28.0 -> git config --global credential.helper manager-core (不工作)

还尝试使用git config --global credential.helper cache

但是在点击上面的命令后我收到了这个错误:

凭证缓存不可用; 没有 unix 套接字支持

$ git pull

fatal: credential-cache unavailable; no unix socket support
fatal: credential-cache unavailable; no unix socket support
fatal: credential-cache unavailable; no unix socket support
fatal: credential-cache unavailable; no unix socket support

还尝试使用 git 凭据存储,它还给出了以下错误git config credential.helper store:

$ git pull

fatal: credential-cache unavailable; no unix socket support

想绕过微软Windows 10密码中git bash一次又一次的提示

谢谢

您必须使用 SSH 密钥来签署计算机与 GitHub/GitLab/GitWhatever 帐户之间的交互。 这是 GitHub 文档,但是您计算机上的进程与使用的 git 平台无关,我想您可以找到其他平台的同类文档。

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh

然后,我猜你试图推送到你自己的存储库,所以使用git://... url 而不是 https 。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM