tag:blogger.com,1999:blog-1545943002454936764.post4908654448572612292..comments2017-08-25T23:22:41.529-07:00Comments on Java 2 C#: Setup a Git server on Windows machine, with MSysGit and CopSSH.tcmasterhttp://www.blogger.com/profile/12229570806153597807noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-1545943002454936764.post-1832396248345532342013-11-30T04:29:27.915-08:002013-11-30T04:29:27.915-08:00in your process,
i. goto C:\SSH\home\git folder,...in your process, <br /><br />i. goto C:\SSH\home\git folder, open the .bashrc file (yes, the same name as in the above line). Insert below line to the first line: (AGAIN, THIS IS A UNIX FILE!) <br /> export PATH=/cygdrive/c/Git/bin:/cygdrive/c/Git/libexec/git-core:$PATH<br /><br />should be like:<br /><br />i. goto C:\SSH\home\git folder, open the .bashrc file (yes, the same name as in the above line). Insert below line to the first line: (AGAIN, THIS IS A UNIX FILE!) <br /> export PATH=/cygdrive/c/SSH/bin:/cygdrive/c/SSH/libexec/git-core:$PATH<br /><br />but whole your article is wonder!! thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-44582361431996961592012-10-02T00:59:44.468-07:002012-10-02T00:59:44.468-07:00Sorry, I don't quite understand what you mean....Sorry, I don't quite understand what you mean. But if you are still struggling on this approach, check out a much easier new way: http://java2cs2.blogspot.de/2012/08/setup-gitblit-on-windows-server-2003.htmltcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-61580579865275778072012-10-02T00:34:51.505-07:002012-10-02T00:34:51.505-07:00It was ok. ,
I have created Server in Virtual X...It was ok. , <br /> I have created Server in Virtual XP. now when it restarted and login back it shows only git user no default. Administrator user i can access.<br /><br />how to switch back to Administrator?Winds & Vapourshttps://www.blogger.com/profile/02951753597242392804noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-42756500168541746842012-04-13T13:40:22.478-07:002012-04-13T13:40:22.478-07:00Never mind :) - I found it: https://www.itefix.no/...Never mind :) - I found it: https://www.itefix.no/i2/node/12281Bob Bakerhttps://www.blogger.com/profile/14878026187987697422noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-36014415988504546372012-04-12T16:47:49.008-07:002012-04-12T16:47:49.008-07:00Fantastic work. We stand on your shoulders.
Anyon...Fantastic work. We stand on your shoulders.<br /><br />Anyone know how to move the git repositories out of the ssh/home folder on the root drive where I installed them? I'd prefer to have all my repos on a data drive. Thanks again!Bob Bakerhttps://www.blogger.com/profile/14878026187987697422noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-34035312801507208722011-07-01T21:36:27.079-07:002011-07-01T21:36:27.079-07:00Gitosis sounds like a deadly social disease! ;-)Gitosis sounds like a deadly social disease! ;-)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-54337633776589944032011-05-27T06:20:18.520-07:002011-05-27T06:20:18.520-07:00Gitosis requires some fixes to be useful on real w...Gitosis requires some fixes to be useful on real world projects. Specifically: adding support for spaces in filenames and fixing Find usage syntax (for Windows). I made a patch kit and submitted it to the author. Sadly, he has a rather peculiar notion that spaces in filenames are errors (and therefore he will never support them). He's a nice guy with a great product, but that is a pitifully small minded attitude.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-57159502107015326682011-03-02T00:47:17.098-08:002011-03-02T00:47:17.098-08:00thank you very much. It's working just great !...thank you very much. It's working just great !thienhaflashhttp://thienhaflash.comnoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-77667435786183007212011-03-01T13:15:46.613-08:002011-03-01T13:15:46.613-08:00It seems you made too much config to SSH server be...It seems you made too much config to SSH server before it works. With the info you provided, it's really hard to identify where is the problem. Just remember, git uses ssh stream to transfer data. If you have have config the server to insert any any unexpected info in response, it won't work. <br /><br />A hint, when using git clone, there is a --verbose parameter, which might show you what is git doing. Hope this helps.tcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-16377109989852385372011-02-21T23:39:18.003-08:002011-02-21T23:39:18.003-08:00Hello tcmaster,
Thanks for the reply.
I found the...Hello tcmaster,<br />Thanks for the reply.<br /><br />I found the problem in COPSSH control panel I changed shell from Windows to Linux and that error go away.. <br /><br />Now coming other problem.. when I clone repository it starts cloning it but than hangs..<br /><br />how to track it?<br /><br />in new folder it creates repository with ".git" folder<br /><br />but when I right click on it and select "GIT bash here" it opens shell in that directory with (unknown) beside it as given below<br /><br />Administrator@Ganesh /e/websites/gtClone/gt1 (unknown)<br /><br />but actually it should show (master) instead.<br /><br />Does anyone know to track this?<br /><br />Thanks in advance.amar4kintunoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-6588577279998618582011-02-21T08:10:31.297-08:002011-02-21T08:10:31.297-08:00To debug this issue, you need to understand how th...To debug this issue, you need to understand how the communication is done. Git is using console stream to transfer data. So a shell (bash) that support this is very important. From what you have described, it seems the key exchange and validation has already passed. So when OpenSSH is trying to start a shell, it started cmd.exe instead of the bash. Please check the if the openssh is configured correctly. <br /><br />Also, if above did not help, can you try to empty the .bashrc (backup it first), and put some command like "ls -l -a" (similar command like windows' "dir /a") and see what happens? (remember this is actually a unix file, try use some editor that supports unix line ending)tcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-79402416975339538822011-02-21T05:59:44.121-08:002011-02-21T05:59:44.121-08:00Hello survivant and Anonymus,
Thanks for reply.
I...Hello survivant and Anonymus,<br /><br />Thanks for reply.<br />I checked .bashrc and .bash_profile and it seems fine to me.<br /><br />Also in my .bashrc line with export command is on 1 single line only as per said by Brikki.<br /><br />Also when I used following command<br /><br />SSH Administrator@Ganesh echo testing commands<br /><br />It gives me following as output.<br /><br />Microsoft Windows[Version 5.2.3790]<br />(C)Copyright 1985-2003 Microsoft Corp.<br /><br />Is there any other way to check the problem?<br /><br />Thanks in advance.amar4kintunoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-76804563927997753252011-02-21T05:39:53.241-08:002011-02-21T05:39:53.241-08:00I had so much trouble installation gitosis, that I...I had so much trouble installation gitosis, that I did a blog about that. To help others to follow a procedure that should work 100%. <br /><br />Maybe you cna find a step that you missed. http://jerabi.com/sdionne/blog/2010/09/06/git-repository-server-gitosis-on-win7-working/Sebastienhttps://www.blogger.com/profile/11094755866430060251noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-82098741040989474132011-02-21T03:28:40.716-08:002011-02-21T03:28:40.716-08:00it seems you are not having bash as shell but cmd....it seems you are not having bash as shell but cmd.exe instead. Maybe you shall check your .bashrc and .bash_profile file to see if all the settings are correct, it's in home folder by default. Also checkout Briki's reply in this thread, it might help.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-29763630369678830252011-02-21T02:29:32.048-08:002011-02-21T02:29:32.048-08:00Hello,
I am setting things on Windows 2003 server...Hello,<br /><br />I am setting things on Windows 2003 server.<br />I followed your steps well.<br />But when I try to clone repository with following commnand<br /><br />git clone -v ssh://Administrator@localhost/SSH/home/Administrator/test.git e:/gt1/<br /><br />it gives me following output<br /><br />cloning into e:/gt1...<br />fatal: protocol error: bad line length character: Micr<br /><br />When I write following in GIT Bash shell<br /><br />$ SSH Administrator@Ganesh<br /><br />It returns following.<br /><br />Microsoft Windows[Version 5.2.3790]<br />(C)Copyright 1985-2003 Microsoft Corp.<br /><br />is it something that might be creating problem?<br /><br />in above error it shows "Micr" is it taking from "Microsoft"???<br /><br />Can anyone here has any idea about it?<br /><br />Thanks.amar4kintunoreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-67348601466125302642010-09-13T01:20:35.880-07:002010-09-13T01:20:35.880-07:00Hi Brikki, thanks for the input and sorry for the ...Hi Brikki, thanks for the input and sorry for the confusion. I did put the export in the same line as the rest of the PATH=..., but since it's too long, browser will wrap it and causes confusion. I'll update the content to mention this.tcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-24014613878650714062010-09-06T18:22:23.776-07:002010-09-06T18:22:23.776-07:00tcmaster, I follow your idea and came out with a g...tcmaster, I follow your idea and came out with a guide : cygwin + gitosis on Windows<br /><br />http://jerabi.com/sdionne/blog/2010/09/06/git-repository-server-gitosis-on-win7-working/Sebastienhttps://www.blogger.com/profile/11094755866430060251noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-58557094517100457092010-08-30T11:14:43.304-07:002010-08-30T11:14:43.304-07:00Thank you for your write up on hosting a Git repos...Thank you for your write up on hosting a Git repository. It went very smooth for me up until I tried to clone the bare repository. I was getting the following error.<br /><br /> fatal: protocol error: bad line length character: decl<br /><br />After some searching I found a forum that mentions that if there are any extra characters returned from an SSH command that it could cause this error message. I tried it out with the command <br /><br /> $ ssh my-username@my-server-address echo testing commands<br /><br />and I got 30 or so messages that looked to be setting environment variables and looked something like this<br /><br /> declare -x ALLUSERPROFILE="C:\\Docume....<br /> declare -x COMPUTERNAME="E1234"<br /><br />with<br /> <br /> testing commands<br /><br />at the bottom. I checked my .bashrc and .bash_profile file for commands that would produce this and realized that 'export' and 'PATH=/cygdrive/c/Git/bin:/cygdrive/c/Git/libexec/git-core:$PATH' need to be on the same line. That's what I get for not carefully following instructions (Step 3i). The 'export' without any argument was causing all the environment variables to be displayed to the screen with each SSH command. The only reason I post it here is to prevent others who are following somewhat blindly, like me, from wasting time on such a simple mistake.Brikkihttps://www.blogger.com/profile/03669857973994821324noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-38136059300083517922010-07-21T20:13:29.918-07:002010-07-21T20:13:29.918-07:00I'm glad you figured it out by urself. I don&#...I'm glad you figured it out by urself. I don't have any folder similar to mingw/lib on my installation, might be OS difference. On winxp, most of the dll&exe files are located under the "bin" folder.<br /><br />If you want to control access, you have to use a different users for logged in users, then you can use windows standard access permission control to handle the rest. If you need more fine-grained tweak, you have to map pubkey to win-user. In general this model works for small team within more or less trusted zone. If you want better solution, I guess you have to go for cygwin+gitosis.tcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-11081740099422331592010-07-21T17:16:33.452-07:002010-07-21T17:16:33.452-07:00I found my problem. the PATH variable. I needed ...I found my problem. the PATH variable. I needed to add : mingw\lib<br /><br />git@admin-PC /home/git<br />$ echo $PATH<br />/cygdrive/c/msysgit/msysgit/:/cygdrive/c/msysgit/msysgit/git:/cygdrive/c/msysgit/msysgit/libexec/git-core/:/bin:/cygdrive/c/Windows/System32:/cygdrive/c/Windows:.:/cygdrive/c/msysgit/msysgit/mingw/bin/Sebastienhttps://www.blogger.com/profile/11094755866430060251noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-21026007933574327752010-07-21T12:07:32.111-07:002010-07-21T12:07:32.111-07:00one question. I can understand the CopSSh install...one question. I can understand the CopSSh installation. We want a ssh server on Windows. Fine. wsysgit on the client and server.. I can understand too. but could I just create a repository with wsysgit on the server and change the permissions on the folder for the user git ?Sebastienhttps://www.blogger.com/profile/11094755866430060251noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-35492006697693009762010-07-20T19:46:37.125-07:002010-07-20T19:46:37.125-07:00When you connect through Putty, you don't put ...When you connect through Putty, you don't put any windows login there, CopSSH will verify your pub/private key pairs and start a shell under the user name you specified in CopSSH and put you in that sheel session.<br />To start CopSSH service, you need a windows account. That's why two accounts, and they can share 1 if you like, though it's not a good idea.<br /><br />All the magic git is doing is to use the SSH stream to pass data. So basically this means, once you can connect through Putty, and you can start git on server, everything should work.<br /><br />I hope this msg helps you do troubleshooting.tcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-91545915994583735062010-07-20T17:09:21.739-07:002010-07-20T17:09:21.739-07:00oups. it worst. I reinstall Copssh and now I got...oups. it worst. I reinstall Copssh and now I got this error<br /><br />C:\Windows\system32>net start opensshserver<br />System error 1069 has occurred.<br /><br />The service did not start due to a logon failure.<br /><br /><br />Lucky me I did that in VirtualBox.Sebastienhttps://www.blogger.com/profile/11094755866430060251noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-70234802892588024872010-07-20T15:57:53.353-07:002010-07-20T15:57:53.353-07:00still the same problem. I'll reinstall it and...still the same problem. I'll reinstall it and try again. What is the worst case if I have the default account ? (SvcCOPSSH) instead of git ?Sebastienhttps://www.blogger.com/profile/11094755866430060251noreply@blogger.comtag:blogger.com,1999:blog-1545943002454936764.post-39241681474879971942010-07-20T02:59:39.289-07:002010-07-20T02:59:39.289-07:00I don't have win7 thus can not re-produce your...I don't have win7 thus can not re-produce your problem. But I encounter this problem when I use windows 2003. Promote your "git" user to administrator should solve the problem.tcmasterhttps://www.blogger.com/profile/12229570806153597807noreply@blogger.com