gpt4 book ai didi

git - 无法从 linode 服务器克隆托管的 git 存储库

转载 作者:行者123 更新时间:2023-12-04 18:39:33 25 4
gpt4 key购买 nike

我最近设置了一个 linode 服务器(Ubuntu 20.04 LTS)来托管一个大学项目的 web 应用程序。
如果我想克隆我们的项目存储库(它由我的大学托管),我会收到以下错误:

通过 https 克隆:

yannic@flask-blog-server:~$ sudo git clone git@ops.hs-kempten.de:swp/vorlage.git
Cloning into 'vorlage'... [This step always took 2 or 3 minutes]
ssh: connect to host ops.hs-kempten.de port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

通过 ssh 克隆:
yannic@flask-blog-server:~$ git clone https://ops.hs-kempten.de/swp/vorlage.git
Cloning into 'vorlage'... [Again this step took 2 or 3 minutes]
fatal: unable to access 'https://ops.hs-kempten.de/swp/vorlage.git/': Failed to connect to ops.hs-kempten.de port 443: Connection timed out

我能够从我的 Windows PC、我的 Raspberry 和 Linux 的 Windows 子系统中克隆所述存储库。
我还能够从我的 linode 服务器克隆托管在 gitlab.com 和 github.com 上的存储库。

最佳答案

这似乎是在 ops.hs-kempten.de 上设置的权限的问题。或在您的 Linode 上设置的权限。我创建了一个新的 Linode 并安装了 git。然后我选择了一个随机存储库来测试克隆过程。当通过 SSH 克隆时,我收到关于需要公钥的错误。[1]这是预期的结果,没有等待 2 - 3 分钟的错误。接下来,我使用 HTTPS 测试了同一个存储库,并且克隆成功,没有任何问题。 [2]

我还通过 SSH 和 HTTPS 对您的存储库进行了测试,并得到了与您相同的结果。 [3] [4]

为什么不创建一个新的 Linode,安装 git,然后尝试克隆您的存储库和随机存储库?同样,我怀疑存在一些权限错误,因此请务必仔细检查您的 Linode 端或 git 服务器端的权限。

祝你好运!

[1]

[root@llin62 ~]# git clone git@github.com:elunez/eladmin.git
Cloning into 'eladmin'...
Warning: Permanently added the RSA host key for IP address '140.82.112.3' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

[2]

[root@llin62 ~]# git clone https://github.com/elunez/eladmin.git
Cloning into 'eladmin'...
remote: Enumerating objects: 216, done.
remote: Counting objects: 100% (216/216), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 8138 (delta 70), reused 167 (delta 50), pack-reused 7922
Receiving objects: 100% (8138/8138), 6.30 MiB | 16.12 MiB/s, done.
Resolving deltas: 100% (3931/3931), done.

[3]

[root@llin62 ~]# git clone git@ops.hs-kempten.de:swp/vorlage.git
Cloning into 'vorlage'...
ssh: connect to host ops.hs-kempten.de port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

[4]

[root@llin62 ~]# git clone https://ops.hs-kempten.de/swp/vorlage.git
Cloning into 'vorlage'...
fatal: unable to access 'https://ops.hs-kempten.de/swp/vorlage.git/': Failed to connect to ops.hs-kempten.de port 443: Connection timed out

关于git - 无法从 linode 服务器克隆托管的 git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61834848/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com