While cloning code from remote repository using visual studio 2019 getting 403 error

2022-08-30T16:34:38.94+00:00

User is having multiple release visual studio install on his machine 2012 2015 and VS enterprise 2019 version 16.11.18. while cloning the code from git on to local machine user is facing issue.

Error message : Error encountered while cloning the remote repository: Git failed with a fatal error.
unable to access 'URL': The requested URL returned error: 403

Git version : git version 2.37.2.windows.2

Troubleshooting performed:

-We tried to clone other repository same issue.
-Tried removing credentials manager from windows.
-git configuration file update

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\etc\gitconfig
C:\Program Files\Git\etc\gitconfig

-Removed all temp files and verified.
-Rebooted local machine to check if any cache file needed update.
-Verified to git settings under visual studio Tools->Options-> source code management.
-Uninstalled visual studio 2019 and re-install.
-Re-install git version 2.37.2.windows.2

We tried to clone same on other's machine in same project but we didn't find any issue there.
We tried to clone on our local machine it worked fine.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
999 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ranganathan 1 Reputation point
    2022-09-06T17:28:23.54+00:00

    Hi Team, We have been tried manual cloning as well, but getting same error message with 403 error. we don't have any specific block was there in the policy. I don't have antivirus was installed on machine.

    C:\Users\MT10144\source\repos>git clone http://*******************/tfs/DefaultCollection/Claims%20Detail%20Lookup/_git/ClaimsDetailLookup
    Cloning into 'ClaimsDetailLookup'...
    fatal: unable to access 'http://atfsappprod01:8080/tfs/DefaultCollection/Claims%20Detail%20Lookup/_git/ClaimsDetailLookup/': The requested URL returned error: 403


  2. 2022-09-14T07:38:17.25+00:00

    @Tianyu Sun-MSFT We are still not able to fix this, and we use enterprise edition of visual studio. Please help us if we can create a ticket and get this fix at earliest as this has been blocking working


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.