IT박스

Windows에서 msysgit을 사용하여 Git 서버 설정

itboxs 2020. 6. 1. 19:22
반응형

Windows에서 msysgit을 사용하여 Git 서버 설정


내 친구와 저는 Windows에서

Git 서버 : Gitosis 및 Cygwin

자습서를 사용하여 Windows 용 Git을 설정하려고 하지만 문제가 계속 발생합니다.

msysgit을

사용하는 Windows 용 "Setup Git Server"안내서는 무엇입니까?gitosis에는 SSH 서버와 Bash를 사용해야하기 때문에 msysgit으로 수행 할 수 없다는 제안이 위의 자습서에 있습니다. 단계별 가이드는 무엇입니까 (사용할 수없는 것이 있습니까)?

  1. mysisgit 설치
  2. ?

이 게시물을 찾았고 방금 블로그에 도움이 될만한 내용을 게시했습니다.

Windows에서 copSSH를 사용하여 Msysgit 서버 설정을

참조하십시오 . 길지만 Windows 7 Ultimate x64 에서이 작업을 성공적으로 수행했습니다.


Tim Davis 페이지 참조

-Windows에서 copSSH를

사용 하여 Msysgit 서버 설정 -Windows 7 Home Premium 64에서 Git 서버를 실행하는 데 사용했습니다.아래는 내가 배운 내용에 대한 사후 / 갱신입니다. Tim Davis가 말했듯이, 이것은 적어도 나에게는 힘들고 실망스러운 과정이었습니다. 나는 이런 종류의 통합에 너무 좋지는 않지만 그 과정에서 많은 것을 배웠습니다. 나는 힘든 과정 이었기 때문에 내 고통이 앞으로 다른 사람에게 도움이되기를 바랍니다.

  1. 모든 Git 실행 파일을 CopSsh bin 디렉토리에 복사하는 단계가 있습니다. 파일을 복사하고 필요한 파일을 알아내는 대신 git bin 경로를 git 경로에 추가하십시오. 내 .bashrc 및 CopSsh 프로필을 수정하여 그렇게했습니다.

    .bashrc에 추가 한 내용은 다음과 같습니다 (CoppSsh 및 Windows 홈 디렉토리에 있음).

    gitpath = '/ cygdrive / c / 프로그램 파일 (x86) / Git / bin'gitcorepath = 'cygdrive / c / 프로그램 파일 (x86) / Git / libexec / git-core' PATH = $ {gitpath} : $ {gitcorepath} : $ {PATH}gitpath = '/ c / 프로그램 파일 (x86) / Git / bin'gitcorepath = 'cygdrive / c / 프로그램 파일 (x86) / Git / libexec / git-core'export PATH = "/ bin : $ syspath : $ gitpath : $ gitcorepath : $ winpath"
  2. 여기에 약간의 복제가 있습니다-그것은 나를 위해 일합니다. 그래서 누군가 경로를 수정하기에 적합한 곳입니다.
  3. 다음은 bash 프로필에 추가 한 내용입니다 (CopSsh 등 / 프로필).
  4. 최신 msysgit 버전은 Git ssh와 PuTTY ssh 중에서 선택하는 ssh 실행 파일을 선택하는 화면을 제공하지 않을 수 있습니다. PuTTY를 사용하는 경우 GIT_SSH를 수동으로 설정해야합니다.
  5. 나는 지침의 한 부분을 따르지 않았고 Tortoise를 설치하고 있었다. 나는 rcs와 Subversion에서했던 것처럼 vc를 배우고 선호하는 방식으로 명령 줄을 대신 사용했다. ssh를 사용하는 clone 명령에 문제가있었습니다. 내가 한 방법은 다음과 같습니다.

    SSH를 사용하여 Git 복제-저장소를 찾을 수 없음

    이것은 내가 머리를 가장 부딪친 곳입니다.
  6. CopSsh 설치 디렉토리는 / Program Files (x86) / ICW입니다. 나는 이것으로 도망 쳤지 만 다시하고 있다면 공백없이 디렉토리 이름을 사용합니다.
  7. 이러한 다른 출처를 통해 문제를 파악할 수있었습니다.Windows에서 Git 서버를 설정하는 다른 방법 :

    http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP

    클라이언트 측면 :

    http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository

    서버로서 Git에 대한 설명 (Windows와 관련이 없지만 설치 단계보다 심도있게 살펴보십시오) :

    http://progit.org/book/ch4-0.html

    Git을 사용한

    O'Reilly의 버전 제어 -원격 저장소 장.

돌이켜 보면 시간이 얼마나 걸릴지 알았다면 Windows에 설치하는 것이 더 쉬워서 Mercurial로 시작했을 수도 있지만 Git과 잠시 작업 한 다음 Mercurial을 시도한 후에는 이에 대한 의견을 가질 것입니다 .


Windows 용 Bonobo Git 서버

로부터

보노보 망할 놈의 서버 웹 페이지

:

Windows 용 Bonobo Git Server는 IIS에 설치하고 git 리포지토리를 쉽게 관리하고 연결할 수있는 웹 응용 프로그램입니다.Bonobo Git Server는 오픈 소스 프로젝트이며

github

에서 소스를 찾을 수 있습니다 .

풍모:

  • 자식 리포지토리에 대한 안전한 익명 액세스
  • 관리를위한 사용자 친화적 인 웹 인터페이스
  • 사용자 및 팀 기반 저장소 액세스 관리
  • 리포지토리 파일 브라우저
  • 브라우저 커밋
  • 현지화

Brad Kingsley

에는 Bonobo Git Server 설치 및 구성에 대한 유용한

자습서

가 있습니다.

GitStack

힘내 스택

은 또 다른 옵션입니다. 다음은 웹 사이트의 설명입니다.

GitStack은 Windows 용 개인 Git 서버를 설정할 수있는 소프트웨어입니다. 즉, Git에 대한 사전 지식 없이도 최신 버전 관리 시스템을 만들 수 있습니다. 또한 GitStack을 사용하면 서버를 매우 쉽게 보호하고 최신 상태로 유지할 수 있습니다. GitStack은 정품 Git for Windows 상단에 구축되며 다른 Git 클라이언트와 호환됩니다. GitStack은 소규모 팀을 위해 완전히 무료입니다

1

.

1 the basic edition is free for up to 2 users


I am not sure why anyone hasn't suggested http://gitblit.com. Pure java based solution, allow HTTP protocol and really easy to setup.


After following Tim Davis' guide and Steve's follow-up, here is what I did:

Server PC

  1. Install CopSSH, msysgit.
  2. When creating the CopSSH user, uncheck Password Authentication and check Public Key Authentication so your public/private keys will work.
  3. Create public/private keys using PuTTygen. put both keys in the user's CopSSH/home/user/.ssh directory.
  4. Add the following to the user's CopSSH/home/user/.bashrc file:

    GITPATH='/cygdrive/c/Program Files (x86)/Git/bin'
    GITCOREPATH='/cygdrive/c/Program Files (x86)/Git/libexec/git-core'
    PATH=${GITPATH}:${GITCOREPATH}:${PATH}
    
  5. Open Git Bash and create a repository anywhere on your PC:

    $ git --bare init repo.git
    Initialized empty Git repository in C:/repopath/repo.git/
    

Client PC

  1. Install msysgit.
  2. Use the private key you created on the server to clone your repo from ssh://user@server:port/repopath/repo.git (for some reason, the root is the C: drive)

This allowed me to successfully clone and commit, but I could not push to the bare repo on the server. I kept getting:

git: '/repopath/repo.git' is not a git command. See 'git --help'.
fatal: The remote end hung up unexpectedly

This led me to Rui's trace and solution which was to create or add the following lines to .gitconfig in your Client PC's %USERPROFILE% path (C:\Users\UserName).

[remote "origin"]
    receivepack = git receive-pack

I am not sure why this is needed...if anybody could provide insight, this would be helpful.

my git version is 1.7.3.1.msysgit.0


GitStack should meet your goal. I has a wizard setup. It is free for 2 users and has a web based user interface. It is based on msysgit.


There is a nice open source Git stack called Git Blit. It is available for different platform and in different packages. You can also easily deploy it to your existing Tomcat or any other servlet container. Take a look at Setup git server on windows in few clicks tutorial for more details, it will take you around 10 minutes to get basic setup.


You don't need SSH for sharing git. If you're on a LAN or VPN, you can export a git project as a shared folder, and mount it on a remote machine. Then configure the remote repo using "file://" URLs instead of "git@" URLs. Takes all of 30 seconds. Done!


There may simply not be such a guide. If so, you may not have much luck convincing anybody to write one, because it would be a lot of work.

I would recommend either of two things. The easier one is to follow the guide you have slavishly, which means forgetting about msysgit.

The harder one is to put up a Linux server - perhaps as a guest under Windows using VirtualBox (free) or VMWare or Parallels (pay), and then follow one of the many sets of instructions Google will lead you to. But you will probably find those instructions are insufficient - they usually assume you've already set up an ssh server, for example, so you have to get that info elsewhere. I've done that twice, and can say that unless you're already something of a Linux guru, it will be a struggle.


I did what Bob Murphy suggested was the "hard" option.

I installed Ubuntu under VMWare Server (free) at work and then followed this guide on setting up Gitosis. I found it much easier than trying to get it going under Windows. Once it's set up you really don't have to touch it because Gitosis administration can be done from Windows by pushing updated versions of the gitosis.conf file. Any work I do need to do on the server directly is done via PuTTY so I don't have to use the horrible VMWare Server interface.

I've recently been messing around with VirtualBox at home and I've found it much nicer/easier to work with than VMWare Server, so it may be worth looking at that.


I just wanted to add my experiences with the PATH setup that Steve and timc mentions above: I got permission problems using shell tools (like mv and cp) having Git's shell executables first in the path.

Appending them after the existing PATH instead this solved my problems. Example:

GITPATH='/cygdrive/c/Program Files (x86)/Git/bin' GITCOREPATH='/cygdrive/c/Program Files (x86)/Git/libexec/git-core' PATH=${PATH}:${GITPATH}:${GITCOREPATH}

I guess CopSSH doesn't go along well with all of msysgit's shell executables...


I'm using GitWebAccess for many projects for half a year now, and it's proven to be the best of what I've tried. It seems, though, that lately sources are not supported, so - don't take latest binaries/sources. Currently they're broken :(

You can build from this version or download compiled binaries which I use from here.

참고URL : https://stackoverflow.com/questions/1482824/setup-a-git-server-with-msysgit-on-windows

반응형