Git pull without SSH?

浪尽此生 提交于 2020-01-04 13:22:34

问题


I'm using MochaHost as hosting, which does not include SSH access (unbelievable). The problem is that I'm using Git for most of my projects now, and I need to deploy them in the hosting.

Tech support says there's no way to get SSH access with them. Changing the hosting company is not an option right now, since I still have 2.5 years left with them already paid.

Is there any way or workaround to clone/pull a Git repo without SSH access? FTP is an option, but it misses the entire point of Git.


回答1:


Have you read the Git url options in the official Linux Kernel Git documentation? You can use a number of different protocols besides ssh with Git:

Git supports ssh, git, http, and https protocols (in addition, ftp, and ftps can be used for fetching and rsync can be used for fetching and pushing, but these are inefficient and deprecated; do not use them).

The following syntaxes may be used with them:

  • ssh://[user@]host.xz[:port]/path/to/repo.git/

  • git://host.xz[:port]/path/to/repo.git/

  • http[s]://host.xz[:port]/path/to/repo.git/

  • ftp[s]://host.xz[:port]/path/to/repo.git/

  • rsync://host.xz/path/to/repo.git/



来源:https://stackoverflow.com/questions/18107431/git-pull-without-ssh

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!