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

我最近设置了一个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和Windows Linux子系统克隆所述存储库。 我还能够从我的linode服务器克隆gitlab.com和github.com上托管的存储库。

wwjj789456 回答:无法从Linode服务器克隆托管的git存储库

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
本文链接:https://www.f2er.com/2341733.html

大家都在问