【问题标题】:remote: Repository not found. on my own github远程:未找到存储库。在我自己的github上
【发布时间】:2019-12-11 13:12:37
【问题描述】:

操作系统:Windows10
git版本:2.23.0.windows.1

几个月前,我创建了一个存储库,一切运行良好。我不得不硬重置我的窗口,现在每当我尝试使用它git clone 'https://github.com/user_name/repo_name.git' 克隆分叉存储库时。

它给了我 remote: Repository not found. fatal: repository 'https://github.com/user_name/repo_name.git/' not found

运行git config --list 我所有的凭据都是正确的。可能是什么原因?

按照@VonC
首先,我尝试了git clone https://github.com/user_name/repo

哪个输出 fatal: unable to access 'https://github.com/user_name/repo/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

第二,我可以通过插入https://github.com/user_name/repo成功访问repo。

第三个,运行 git config --global http.sslBackend "openssl" 然后尝试克隆 git 仍然呈现相同的 repo not found

第四个,通过运行git config -l 我得到http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

所以现在运行git config --system http.sslcainfo "C:\Program Files\Git\mingw64\ssl\certs\curl-ca-bundle.crt",它应该可以工作,但是

它给了我error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied

【问题讨论】:

    标签: git github


    【解决方案1】:

    首先,尝试 git clone https://github.com/user_name/repo_name(没有引号,没有最后的 .git/)

    其次,仔细检查您的 URL 的大小写(大写、小写),尝试在浏览器中转到 git clone https://github.com/user_name/repo_name 以查看它是否可见/可访问。

    请注意,git config 仅包括 user.name/user.email,它们不是凭据(仅在创建新提交时用于作者身份的设置)
    仅当您的存储库是私有的时,凭证才重要。

    关于 OpenSSL 错误消息,请检查 git config --global http.sslBackend "openssl" 是否有帮助,关注 desktop/desktop issue 3326。
    确保您的证书(包含在 Git For Windows 中)也被引用(如 seen here):

    git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
    

    (根据自己的Git安装文件夹适配路径)

    【讨论】:

    • 但是为什么会这样呢?我直接从 github 克隆复制 url 或下载绿色按钮
    • @你在什么操作系统上?你使用的是什么版本的 Git?是私有仓库吗?
    • @haneulkim 注意:下载绿色按钮不应在 URL 的末尾为您提供最终的“/”。
    • 是的,我可能不小心在末尾添加了“/”。我已经分叉了私人仓库,但是当我可以在我的设置中看到这个仓库的 SSH 时
    • 我什至没有在 \git\bin 文件夹中看到 curl-ca-bundle.crt
    猜你喜欢
    • 2012-04-28
    • 1970-01-01
    • 2021-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多