简体   繁体   English

git推窗到窗户

[英]git push windows to windows

I currently have a setup where on my windows machine with cygwin I added my linux server as a remote origin where I can then push my changes as I have my SSH keys configured. 我目前有一个设置在我的Windows机器上与cygwin我添加我的Linux服务器作为远程源我可以推动我的更改,因为我配置了SSH密钥。

git add remote origin ip@path.git
git push origin

How would I do this to my windows machine is it as simple as hosting an SSH server and if so which do you recommend? 我如何对我的Windows机器这样做就像托管SSH服务器一样简单,如果是这样,你推荐哪一个?

It sounds as if you want be able to push to the repository on a Windows machine, so git daemon and the git protocol won't be enough for you. 听起来好像你想要能够推送到Windows机器上的存储库,所以git daemon和git协议对你来说是不够的。 If you need to be able to push to the repository you're left with these options: 如果您需要能够推送到存储库,您将获得以下选项:

  1. Run an SSH server on your Windows box. 在Windows框中运行SSH服务器。 There are various guides you can find for doing this with Cygwin, eg this one or this one . 使用Cygwin可以找到各种指南,例如这一个这个 An alternative is to use mSysGit, in which case you could chase the references in this Stack Overflow question: Setup a Git server with msysgit on Windows 另一种方法是使用mSysGit,在这种情况下你可以追逐这个Stack Overflow问题中的引用: 在Windows上用msysgit设置一个Git服务器
  2. Use git's "Smart HTTP" protocol - sdorra's answer implies that SCM-manager lets you do this, but I've no experience of that. 使用git的“智能HTTP”协议 - sdorra的回答意味着SCM管理器允许你这样做,但我没有经验。 However, Smart HTTP is essentially just provided by a binary called git-http-backend that you can use over CGI. 但是,Smart HTTP基本上只是由一个名为git-http-backend的二进制文件提供,您可以在CGI上使用它。 This binary is distributed in mSysGit, so you could set that up with a web server - for example, there's a tutorial on doing that with Apache here 这种二元分布在mSysGit,这样您就可以设置了一个Web服务器-例如,有一个教程这样做与Apache 这里

Another alternative is to mount your remote computer as a local drive and add it as a remote using the file: protocol. 另一种方法是将远程计算机作为本地驱动器安装,并使用file: protocol将其添加为远程计算机。

You can use git daemon. 你可以使用git守护进程。 Hosting Git Repository in Windows 在Windows中托管Git存储库

或者您可以使用SCM-Manager并执行推送或拉取http。

You could use Gitblit , an open-source, integrated, pure Java Git server, viewer, and repository manager for small workgroups. 您可以使用Gitblit ,一个用于小型工作组的开源,集成,纯Java Git服务器,查看器和存储库管理器。 It works well on Windows and includes tools to run as a Windows service. 它在Windows上运行良好,包括作为Windows服务运行的工具。

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

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