Error: ..info/refs not valid: is this a git repository?

2,579 views
Skip to first unread message

Bonobo Git Server

unread,
Nov 23, 2013, 3:54:36 AM11/23/13
to bonobo-g...@googlegroups.com
I installed the Bonobo server for Git on my Windows 2008 Server. Anonymous access is disabled, and https(ssl) is used for Transport.

When I tried to clone a repository to a Windows 8 client, I got the following message:

D:\\GitPlayGround>git clone https://a.b.com/GitTest.git
Cloning into 'GitTest'...
Username for 'https://a.b.com': ab
Password for 'https://n...@a.b.com':
fatal: https://a.b.com/GitTest.git/info/refs not valid: is this a git repository?

Jakub Chodounský

unread,
Nov 23, 2013, 3:55:24 AM11/23/13
to bonobo-g...@googlegroups.com
I also found the solution. It took me some time to find it, but finally it was simple. In IIS manger for the site Windows Authentication was enabled, Standard(Basic) Authentication was disabled. After enabling Standard, and disabling Windows Authentication in IIS Manager all was working fine.

When the error showed up, the content of the log file was not very descriptive.

w3wp.exe Error: 0 : Error occured and caught in Global.asax - System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Bonobo.Git.Server.GitAuthorizeAttribute.OnAuthorization(AuthorizationContext filterContext)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass25.b1e(AsyncCallback asyncCallback, Object asyncState)
...
...

Maybe someone could change the code to improve the log file. It is enough to change method OnAutorization in GitAuthorizeAttribute. Here is what I suggest:

 ...
string auth = filterContext.HttpContext.Request.Headers"Authorization";
  if (!String.IsNullOrEmpty(auth))
  {
      if (!auth.StartsWith("Basic "))                                                                                    // added
      {
         Trace.TraceError("No basis authentication in IIS, authentication toke is: {0}",auth);                    // added
      }
...

 With this change people running into this problem may find the solution easier.

K.E.

unread,
Feb 26, 2014, 4:38:17 AM2/26/14
to bonobo-g...@googlegroups.com
I get the same error if i try to change the repository directory from default to "D:\Repositories".
The Security Permissions for "IIS_IUSRS" are the same.
Only the default folder: "c:\inetpub\wwwroot\Bonobo.Git.Server\App_Data\Repositories" works.
I use a Windows 2008R2 Server and Bonobo 2.0.1 with forms authentication. http://bonobogitserver.com/forms-authentication/

Reply all
Reply to author
Forward
0 new messages