git - 我自己的 github 上的远程 : Repository not found.

标签 git github

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

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

它给了我 远程:未找到存储库。致命:找不到存储库“https://github.com/user_name/repo_name.git/”

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

关注@VonC
首先,我试过git clone https://github.com/user_name/repo

哪些输出 致命:无法访问“https://github.com/user_name/repo/”:OpenSSL SSL_connect:SSL_ERROR_SYSCALL 连接到 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 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,它们不是凭据(仅在创建新提交时用于作者身份的设置)
仅当您的存储库是私有(private)的时,凭据才重要。

关于 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安装文件夹调整路径)

关于git - 我自己的 github 上的远程 : Repository not found.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59279031/

相关文章:

git - 如何在git中找到最后一次 merge ?

github - 在 GitHub 问题跟踪器中,非管理员用户可以分配用户和标签吗?

Git 标记问题

git - 为什么 Git 认为我的 cs 文件是二进制的?

git 多仓库管理

git - -f 选项对 git rm 命令意味着什么?

github - 如何部署876MB大小的github项目?

github - 之前从 github 获取问题

git - 坚持 push ,没有任何反应

git 克隆 ssh 权限被拒绝