如何将文件从私有Github复制到Webhosting?

如何将文件从私有Github复制到Webhosting?,git,symfony,ssh,versioning,web-hosting,Git,Symfony,Ssh,Versioning,Web Hosting,我目前正在用Symfony2开发一个新网站。我正在使用Github进行版本控制。我的网络主机支持ssh,我正在使用putty访问它 据我所知,应该可以通过ssh将最新提交(主)同步到webhosting?(意味着在提交后,我希望将网站数据同步到webhosting以使其公开) 我查找了rsync,但没有找到真正的解决方案。我尝试了以下命令: rsync git@github.com:namexy/namexy.git / 即使我认为我已经安装了SSH密钥,我仍然收到以下错误消息: /home/

我目前正在用Symfony2开发一个新网站。我正在使用Github进行版本控制。我的网络主机支持ssh,我正在使用putty访问它

据我所知,应该可以通过ssh将最新提交(主)同步到webhosting?(意味着在提交后,我希望将网站数据同步到webhosting以使其公开)

我查找了rsync,但没有找到真正的解决方案。我尝试了以下命令:

rsync git@github.com:namexy/namexy.git /
即使我认为我已经安装了SSH密钥,我仍然收到以下错误消息:

/home/namexy/.ssh/config: line 1: Bad configuration option: sh-rsa
/home/namexy/.ssh/config: terminating, 1 bad configuration options
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(601) [Receiver=3.0.8]
这是由于命令或ssh密钥中的某些错误导致的问题吗


提前感谢你们的帮助

您的ssh配置文件中有一个错误。关于这一点,错误消息非常清楚:

/home/namexy/.ssh/config: line 1: Bad configuration option: sh-rsa
/home/namexy/.ssh/config: terminating, 1 bad configuration options
您包含了一个名为sh rsa的选项,该选项不存在

看起来您将ssh脉冲密钥复制到了
~/.ssh/config
而不是
~/.ssh/id\u rsa.pub

ssh公钥(rsa)看起来有点像

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD3+wBomfzBwA8IXw4x/Ud3kt5541rOw4UVXuJaQbMYXA5lq686AyEbtk3L
...
mNVHcR2J user@host
。。。而您的
~/.ssh/config
应该是这样的:

Host github.com github gh
  Hostname github.com
  User git
  IdentityFile ~/.ssh/id_rsa 

看一看capifonyI更进一步,现在有以下信息: