Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have setup a WebGitNet MVC site under IIS on Windows 7 Pro 64-bit (not joined to a domain).

WebGit .NET: IIS Hosting for Git "Smart HTTP" using ASP.NET MVC

The code has no authentication method specified in it, and I am trying to determine which authentication method to use under IIS to secure the site. I have tried all available methods with no success (meaning it either does not authenticate from Git or a browser, or only works in the browser). I am currently running without SSL. Once I get the auth working, I will add in SSL as well.

I need the auth to work both from a bash command line (for clone, fetch, push, etc.), as well as in Chrome when using the site to create new repos, etc.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

For my personal uses, I am using windows authentication, using the "Basic authentication" option in IIS. I also have SSL enabled, so that my password is not actually sent in the clear.

Basic Auth SSL

However, you can use any of the authentication methods available in IIS. At my old place of employment, we used Integrated windows authentication, so that we could control acces to the site via roles.

If you do have an authentication method that has roles, you should be able to lock down access to the repositories using the IIS URL restictions in the Web.config.

If you need more details, let me know!

share|improve this answer
    
Thanks for the response. I have since discovered windows auth (with no SSL) is working fine for me from a bash command line. When I try a push with Git Extensions, which I normally use, it does not work. It hangs without ever prompting me for user/password. That sounds like not your problem, so thanks again for the clarification. If you do have success using Git Extensions for a push, I would be interested in hearing about that. –  RedFilter Mar 16 '12 at 15:37
    
Git Extensions masks the username / password box. I assume a cmd.exe window pops up? Just type it in like you would normally. It will let it through. –  John Gietzen Mar 16 '12 at 22:40
    
No popup occurs, just hangs. I use Git Extensions all the time with other repos requiring auth, works no problem... –  RedFilter Mar 16 '12 at 23:55
    
Did you by any chance chose PuTTy as your SSH client? –  John Gietzen Mar 17 '12 at 2:23
    
No, I normally use OpenSSH - I'll give Putty a shot. –  RedFilter Mar 17 '12 at 15:54
show 2 more comments

I am also using WebGit .NET on IIS 7 with SSL and Windows Authentication.

To push with Git Extensions, check if you have the 'Show Git commandline dialog when executing process' option set under Settings->Settings->Git extensions. If you don't have this checked, Git Extensions just appears to hang when doing the push. When you do have it enabled, a blank command window pops up when doing the push. If I enter the Windows user name, press enter, enter password, and press enter again, then the push works.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.