3

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.

2 Answers 2

1

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!

7
  • 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, 2012 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. Mar 16, 2012 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, 2012 at 23:55
  • Did you by any chance chose PuTTy as your SSH client? Mar 17, 2012 at 2:23
  • 1
    RedFilter, this is a "well known" Windows feature called the loop back check: support.microsoft.com/kb/896861 Nov 7, 2012 at 19:10
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .