想使用sourcetree监控我的在线网站并更新我的代码

时间:2016-07-15 16:50:00

标签: git

我正在尝试这么多解决方案来解决这个问题。这个场景是,我有一个hostgator托管,我想使用git(源代码树)来克隆我的项目。因此,当我更改这些文件时,我可以检查回来,推后它会在网站上更新。

http://www.arlocarreon.com/blog/git/push-git-repo-into-shared-hosting-account-like-hostgator/
How do I create a git repo on my shared hostgator?
我尝试了这些方法,将我的机器RSA密钥添加到托管中。但我真正的问题是无法下载它。是否可以克隆它,何时推送它将更新网站?

我收到的错误很少:

$ git clone --bare ****@******.com:public_html/.git
Cloning into bare repository 'public_html.git'...
Connection closed by xxx.xxx.xxx.xxx
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


 $ git clone ssh:// ****@******:public_html/
    Cloning into 'public_html'...
    ssh: Could not resolve hostname  ****@******:public_html: Name or service not known
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

有人在这个问题之前解决了吗?或者无法在sourcetree上使用它?

1 个答案:

答案 0 :(得分:0)

您拥有什么类型的托管服务?

http://support.hostgator.com/articles/hosting-guide/lets-get-started/how-do-i-get-and-use-ssh-access#connect

  1. 您需要创建从源树到主机gator的SSH连接,以便拉出/推送到hostgator帐户中的存储库。
  2. ssh -p 2222 cpanelusername@cpanelipaddress我在Mac上。

    1. 在本地计算机上的.ssh文件夹中创建一个id_rsa。记住并记下密码!