【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 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的一种可能

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

山鬼谣me

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值