0


【GIT】Git clone https://xxx.git 报错仓库找不到,ssh却可以。

环境

MacBook Pro:13.0 (22A380),Intel。
Python:3.10.9

序言

最近在Mac电脑中按照stable diffusion webUI 时,总是报:

  1. MacBook-Pro:openai yutao$ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
  2. 正克隆到 'stable-diffusion-webui'...
  3. remote: bye :(
  4. 致命错误:仓库 'https://github.com/AUTOMATIC1111/stable-diffusion-webui.git/' 未找到

或者

  1. 正克隆到 '/Users/yutao/openai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'...
  2. remote: bye :(
  3. 致命错误:仓库 'https://github.com/Stability-AI/stablediffusion.git/' 未找到

类似这样的错误。

经过各种尝试后,发现,我的MacBook Pro,使用

  1. git clone git@github.com:xxx.git

地址时,可以下载下来,
但是当使用

  1. git clone https://xxx.git

时,就会提示,仓库找不到。

  1. remote: bye :(
  2. 致命错误:仓库 'https://github.com/xxx.git/' 未找到

解决办法

网上有种情况,说是也因为过期的钥匙串导致的。
但是我搜索MacBook Pro 电脑发现,我的钥匙串里面压根就没有github的密码配置。

我的办法如下:

  1. git config --global url."git@github.com:".insteadOf "https://github.com/"

也就是通过配置,将

  1. https://github.com/

替换为

  1. git@github.com:

假设我们想删除的话,

  1. git config --unset key名称
  2. # 例如
  3. git config --unset url.git@github.com:.insteadof

参考地址:

Git clone using https is not working, but works with help of ssh

git报错remote: Repository not found的一种可能

标签: git ssh

本文转载自: https://blog.csdn.net/u013066244/article/details/133309741
版权归原作者 山鬼谣me 所有, 如有侵权,请联系我们删除。

“【GIT】Git clone https://xxx.git 报错仓库找不到,ssh却可以。”的评论:

还没有评论