环境

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 git@github.com:xxx.git地址时,可以下载下来,
但是当使用git clone https://xxx.git时,就会提示,仓库找不到。

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

解决办法

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

我的办法如下:

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

也就是通过配置,将https://github.com/替换为git@github.com:

假设我们想删除的话,

git config --unset key名称
# 例如
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的一种可能

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐