简体   繁体   English

在Windows 7的Lamp服务器推送上设置git-使用PuTTY进行SSH

[英]Setting up git on Lamp server pushing from Windows 7 - SSH with PuTTY

Trying to set up a git environment but hitting a wall with finding instructional material... 尝试建立git环境,但找到说明材料却碰壁了...

I have git installed and working beautifully on windows locally, and separately on my LAMP server. 我已经在本地Windows上以及分别在LAMP服务器上的Windows上安装了git,并在其上正常工作。 They both have repositories, I can add, commit etc. 它们都有存储库,我可以添加,提交等。

How do I make the two git servers talk? 如何使两个git服务器通话? I can only find tutorials about connecting with github, but that doesn't help me. 我只能找到有关与github连接的教程,但这无济于事。

I have Msysgit installed on windows and would like to use PuTTY. 我在Windows上安装了Msysgit,想使用PuTTY。 They each have ssh keys. 它们每个都有ssh密钥。 Just not sure how to make them speak to each other... 只是不确定如何使他们彼此交谈...

Please advise... Thanks! 请指教...谢谢!

One of the ways to get two 'git servers' to 'talk to each other' is to add one repository as a remote to the other and then push to (and pull from) the remote ('remote' is git terminology). 使两个“ git服务器”彼此“交谈”的方法之一是将一个存储库添加为另一个存储库的远程,然后推入(或从中拉出)该远程存储库(“ remote”是git术语)。 This would look something like this: 看起来像这样:

cd /path/to/repo
git remote add computer_b ssh://user@computer_b:path/to/repo.git
git pull computer_b

(all done on computer_a) (全部在computer_a上完成)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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