简体   繁体   中英

How to get the process when I use ssh to a remote server to git a repository?

I am from China, and for some reason git connect is very slow. I know how to use git proxy, but still not fast.

What I know and tried is to SSH to my VPS and download git repository in my VPS. and then I zip the repository fold and SCP the zip from in my local computer. In this way, finally I get my git repository which it very comfortable for my and it is fast!!!

Now I want to know, is there a simple command or shell to achieve this?
I cant handle it by typing every time but it is not effective.

scp relies on ssh . You can always clone the repository over ssh from your VPS. In one line you could do something like this:

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

Reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM