{"thread":{"id":"62040","subject":"git-http-backend errors under IIS","startedAt":"2024-09-02T20:18:17Z","lastAt":"2024-09-02T20:18:17Z","messageCount":1,"participants":["forums@hyper-plaza.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"501993","messageId":"001301dafd75$3f95bdf0$bec139d0$@hyper-plaza.com","threadId":"62040","inReplyTo":null,"subject":"git-http-backend errors under IIS","fromName":"","fromEmail":"forums@hyper-plaza.com","sentAt":"2024-09-02T20:18:16Z","receivedAt":"2024-09-02T20:18:17Z","isPatch":false,"sender":{"key":"forums@hyper-plaza.com","avatar":null},"body":"Im getting errors trying to execute simple git clone from IIS-hosted\ngit-http-backend to a local folder.\n\nSetup:\nHost: fresh install of x64 Windows Server 2022 Standard on i7-11700K @\n3.60GHz with 32GB RAM & 2x 1TB SSD drives, named zeus, IIS version 10.0.\nHost has the latest 64-bit git version 2.46.0.windows.1\nClient: either the same machine or Hyper-V VM on the same box with 1 Virtual\nCPU & 4GB of RAM running Windows 10 Enterprise LTSC 21H2. VM has 64-bit git\nversion 2.37.0.windows.1\n\nIIS is configured with dedicated git website running on port 80 with its\nown app pool and local git user as identity. Therere no other sites on\nthat port and I stopped the rest of the sites anyway. The site has Anonymous\nauthentication disabled and Basic Authentication enabled with CGI\nImpersonation True\n\nTest git repository myproject.git was initialized from command window in the\nhost folder pointed to by IIS git website using command:\ngit init --bare myproject.git using git version 2.46.0\n\nTest case 1:\ngit clone http://zeus/myproject.git executed from the host command window\nusing test user credentials results in error:\n>fatal: http://zeus/myproject.git/info/refs not valid: could not determine\nhash algorithm; is this a git repository?<\n\nPlease note the path myproject.git/info/refs doesnt even exist in the repo,\nthe folder myproject.git/info/ contains single file exclude and nothing\nelse. \n\nTest case 2:\ngit clone http://zeus/myproject.git executed from the VM command window\nusing test user credentials results in error:\n>fatal: unable to access 'http://zeus/myproject.git/': Header without colon<\n\nIf I execute the above commands with host Administrator credentials they\nboth succeed with correct warning (the repo was just initialized):\n>warning: You appear to have cloned an empty repository.<\n\nSo far the issue sounds like some permissions problem, especially taking\ninto account when I tried to make test user member of the host\nAdministrators group both commands worked after iisreset.\nUnfortunately I was unable to figure out what permission(s) are missing, the\nuser clearly passes authentication step and executes git-http-backend.exe as\nI had different error when it was unable to.\n\nWhat is really odd if I downgrade git version on the host to 2.44.0 then\neverything starts working as expected for the test user as well even after I\nremoved it from Administrators group and performed iisreset, the rest was\nthe same:  the site / permissions / etc\n\nI actually started from version 2.37.0 thinking may be it would make a\ndifference as I recalled the similar set up was working under 2.37.0 and to\nmy great surprise it worked indeed. Then I decided to upgrade the version\nand 2.44.0 was the latest one that worked from the versions I tried. I\nbelieve I also tried 2.45.2 and it gave the same errors as 2.46.0 so I left\nit at 2.44.0. I didnt try any other version between 2.44.0 and 2.45.2.\n\nSince this issue misleadingly looks like permission one and the error\nmessages are really odd and it cost me a day to troubleshoot I decided to\npublish it here to possibly spare someone major headache.\n\nPlease let me know if Im missing something obvious or if its indeed a bug\nthat very well may be specific to my environment which triggers some racing\ncondition in the code. \nIf theres an interest in tracing this problem further I can easily\nreproduce it as the system is not used for Production. The Portable version\n2.46.0 has the same problem so switching back and forth between versions is\nreally simple, I just replace content of the git folder with another\nversion.\n\nThanks,\nMichael.\n\n\n\n"}]}