0


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

环境

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

序言

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

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

或者

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

类似这样的错误。

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

git clone [email protected]:xxx.git

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

git clone https://xxx.git

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

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

解决办法

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

我的办法如下:

git config --global url."[email protected]:".insteadOf "https://github.com/"

也就是通过配置,将

https://github.com/

替换为

[email protected]:

假设我们想删除的话,

git config --unset key名称
# 例如
git config --unset [email protected]:.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却可以。”的评论:

还没有评论