Keep getting error: Could not connect to the Local Git repository.

Category: azure git


Liuhongbo on Fri, 09 May 2014 14:16:53

i setup a azure website in free tier,  and also in the management portal, setup the deployment from source control, then in following screen, ask where is your source code,  , i select [Local Git repository].

After the setup, yesterday i was able to go to the deployment tab of that website in the management portal , it shows the information about the `git` url .

this morning, i went to the deployment tab, then i got an error:

    Could not connect to the Local Git repository.

The details says:

`Scm service error is "Response status code does not indicate success: 403 (Forbidden).`

Any idea?

Here is the steps i followed.

The "the Local Git repository" in the error message, does that mean the local git on my local computer?  As i understand, i should push my local git on my computer to azure, why would azure try to connect to my local git ? There is no way, right?



David Ebbo on Fri, 09 May 2014 15:48:55

That is strange. A couple things to try to help isolate:

  1. Is the site running, and are you able to browse to it?
  2. Are you able to access the Kudu service from the browser?


David Ebbo on Fri, 09 May 2014 15:57:17

Another thing to try is to got to a different page in the portal (e.g. dashboard) and then back to deployment, so check whether it is transient or consistent.

Liuhongbo on Fri, 09 May 2014 19:04:54

I updated my question with more information.

i can browser the site without any issue, even though that's the default page for the azure website.

I went to dashboard and came back to that page, the same error.

when i visit scm side, it give me the following message:

You do not have permission to view this directory or page.

I would like to provides more information:

1.  when i create a webiste, there is  an option [Publish from source control],  i check that, the next step will be let me choose where is your source code, that's how i setup yesterday, and the deployment tab will show the git url to me;

If I don't check that option and finish the setup, then i went to dashboard click [setup deployment from source control], and then select where is your source code, then click ok, the will give me the same error, could not connect to the local git repository with the same detail

2.  I can delete git repository at the dashboard again, and try it add it again, same error.

David Ebbo on Fri, 09 May 2014 20:49:06

The git repository uses the scm site under the cover, so it simpler to focus the investigation on just accessing the root of the scm site. If that works, it's likely everything else will (and vice versa).

A few more question to isolate:

  1. Are you able to access the site via FTP based on the FTP info you see on the dashboard page?
  2. Are you an admin on the site, or a co-admin?
  3. If you create a brand new site is that subscription, do you see the same issue when accessing the scm site?

Would you be able to create a dummy site in that subscription and share its name? That would give a starting point to investigate.


Liuhongbo on Fri, 09 May 2014 21:39:32

1. I click that ftp link on the dashboard, the browser opened up a new tab, ask me the username and password, so i input my deployment credential, it didn't went through, still asking for the username/password again

2. i am the admin

3. created a dummy site, under the same subscription. but seems no issue.  I went back to site with issue again to try it again, still the same error.

Here is the site that I have issue with,,

 i haven't upload any files yet, so hope that can help identify the issue.  Maybe related with the name? i wont believe it.


David Ebbo on Fri, 09 May 2014 22:20:35

For #1, note that the user name for FTP has a prefix, so not exactly the same as for git. If you go to the dashboard, it gives you the exact name to use under the 'DEPLOYMENT / FTP USER' section.

It would be interesting to try this both with your dummy site that has no issue, and with your site that has problems, to compare the two behaviors. Note that most people use Filezilla as an FTP client, as that works much better than the default client (though default should be enough to test).

Liuhongbo on Sat, 10 May 2014 00:34:52

I tried with FtpZillla with both sites, works on both. I notice both sites have the same ftp url, but i login in with different username as you point out.  Both sites i can login without any issues.

David Ebbo on Sat, 10 May 2014 01:49:05

Ok, I just figured out the issue. The site is configured to use .NET v3.5, and we currently have a limitation that git doesn't work in these scenarios (we're working to address this).

Is there any chance that you can run the site as .NET v4.5 instead?



Liuhongbo on Sat, 10 May 2014 01:54:54

Great!!! thanks a lot,  I will test see if we can migrate to .net 4.5.