Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 当我使用ssh将远程服务器连接到git存储库时,如何获得该过程?_Linux_Shell - Fatal编程技术网

Linux 当我使用ssh将远程服务器连接到git存储库时,如何获得该过程?

Linux 当我使用ssh将远程服务器连接到git存储库时,如何获得该过程?,linux,shell,Linux,Shell,我来自中国,出于某种原因,git connect非常慢。我知道如何使用git代理,但仍然不快 我知道并尝试的是使用SSH连接到我的VPS,并在我的VPS中下载git存储库。然后我将存储库的拉链折叠起来,并将拉链从本地计算机中取出。通过这种方式,我终于得到了我的git存储库,它对我的用户来说非常舒适,而且速度很快 现在我想知道,有没有一个简单的命令或shell来实现这一点? 我无法通过每次键入来处理它,但它无效。scp依赖于ssh。您始终可以通过ssh从VPS克隆存储库。在一行中,您可以执行以下操

我来自中国,出于某种原因,git connect非常慢。我知道如何使用git代理,但仍然不快

我知道并尝试的是使用SSH连接到我的VPS,并在我的VPS中下载git存储库。然后我将存储库的拉链折叠起来,并将拉链从本地计算机中取出。通过这种方式,我终于得到了我的git存储库,它对我的用户来说非常舒适,而且速度很快

现在我想知道,有没有一个简单的命令或shell来实现这一点?

我无法通过每次键入来处理它,但它无效。

scp
依赖于
ssh
。您始终可以通过
ssh
从VPS克隆存储库。在一行中,您可以执行以下操作:

$ ssh <VPS> git clone https://<project.git> && git clone ssh://VPS/<project.git>
$ssh git clone https://&&git clonessh://VPS/