You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/devops/git-clone-push-operation-failing-devops-repo.md
+37-13Lines changed: 37 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Git clone or Git push fails to an Azure DevOps repository
3
3
description: This article discusses problems that might occur when you try to perform Git clone or Git push function to an Azure DevOps repository.
4
4
author: HaiyingYu
5
5
ms.author: haiyingyu
6
-
ms.reviewer: kirt
6
+
ms.reviewer: kirt, dmittal
7
7
ms.topic: troubleshooting
8
-
ms.date: 05/19/2023
8
+
ms.date: 03/24/2025
9
9
ms.service: azure-devops
10
10
ms.custom: sap:Repos
11
11
---
@@ -42,7 +42,7 @@ To learn more about Git environment variables, see [Git Internals - Environment
42
42
43
43
If you're using a proxy server but the Git configuration isn't set to connect through the proxy server, you might see the 407 or 502 error messages. This issue also occurs when the connection can't establish through the proxy server, and you see the errors similar to "unable to access <`your github url`\>:" or "couldn't resolve host `github.com`".
44
44
45
-
### Solution: Configure Git to use the proxy server
45
+
### Recommendation: Configure Git to use the proxy server
46
46
47
47
Run `git config --list` to get a list of all the Git configuration on the system, and check whether the proxy server is in use.
48
48
@@ -65,13 +65,13 @@ For more information on Git configuration, see [Git Config Documentation](https:
65
65
66
66
If Git is using a local self-signed certificate, you might see the error "SSL certificate problem: unable to get local issuer certificate."
67
67
68
-
### Solution 1: Disable the TLS/SSL verification
68
+
### Recommendation 1: Disable the TLS/SSL verification
69
69
70
70
If you've installed a local Team Foundation Server (TFS) and if you want to disable the TLS/SSL verification that Git performs, run the following command:
71
71
72
72
`git config --global http.sslVerify false`
73
73
74
-
### Solution 2: Configure the self-signed certificates in Git
74
+
### Recommendation 2: Configure the self-signed certificates in Git
75
75
76
76
If you want to continue the TLS/SSL verification that Git does, follow these steps to add the root certificate in the local Git:
77
77
@@ -122,20 +122,44 @@ If you want to continue the TLS/SSL verification that Git does, follow these ste
122
122
123
123
If your account name or domain password has changed, or you're getting an authentication error, there could be authentication and credential cache issues.
124
124
125
-
### Solution: Reset the Git credentials manager (GCM)
125
+
### Recommendation: Reset the Git credentials manager (GCM)
126
126
127
127
To resolve the authentication error or credentials cache issues, begin by following the [Troubleshooting checklist](#troubleshooting-checklist) to get the error information, and then follow these steps:
128
128
129
-
1. Run the `git config --list` command, and then check if you're using Git Credentials Manager (GCM). If the `credential.helper` is set to manager, then GCM is in use.
130
-
1.Reset the GCM by following these steps:
129
+
1. Run the `git config --list` command, and then check if you're using Git Credentials Manager (GCM). If the `credential.helper` is set to manager, GCM is in use.
130
+
1.Follow these steps to reset the GCM:
131
131
1. Run the `git config --global --unset credential.helper` command to unset the GCM.
132
-
1. Run the `git config credential.helper manager` command to set the GCM back. Alternatively, follow these steps to delete the credentials cache first:
133
-
1. When unset, search for **Credentials Manager** in Windows search, select **Open**, and then remove any credential that is for a Git repo.
134
-
1. Go to _%localappdata%/GitCredentialManager_ path, and then delete the _tenant.cache_ file.
135
-
1. Set the GCM back by running the `git config credential.helper manager` command.
132
+
1. Run the `git config --global credential.helper manager` command to set the GCM back.
133
+
134
+
Alternatively, you can follow these steps to remove cached credentials:
135
+
- On Windows, Git credentials are stored in the Windows Credential Manager. You can access it in the following ways:
136
+
137
+
- Using GUI (Windows Credential Manager):
138
+
139
+
1. Open Control Panel and select **User Accounts** > **Credential Manager**.
140
+
1. Select **Windows Credentials**.
141
+
1. Look for entries related to `git:https://dev.azure.com/<orgname>` or your Git provider and manage them. For github, it's like `git:https://github.com/`.
142
+
143
+
- Using command line:
144
+
145
+
1. Run `cmdkey /list | findstr "git"` to list Git credentials.
146
+
1. Run `cmdkey /delete:https://dev.azure.com/<orgname>` to delete the credentials.
147
+
1. If you need to reset credentials and re-enter them, run `git credential reject https://dev.azure.com/<orgname>`.
When you run this command, you're instructing Git to invalidate or remove the stored credentials for the specified URL. This means that the next time you try to access the repository at that URL, Git will prompt you to enter your credentials again. This is useful if you need to reset your credentials.
154
+
155
+
-`git credential approve https://dev.azure.com/<orgname>` to approve the credentials.
156
+
157
+
This command is used to manually store and approve credentials for future use, which ensures that you won't be prompted for credentials each time.
158
+
136
159
1. Perform the cloning operation to verify if the issue is resolved.
137
160
138
-
**Note:** Depending on the version of Git for Windows, the `credential.helper` value would be different. See the following table for details:
161
+
> [!NOTE]
162
+
> Depending on the version of Git for Windows, the `credential.helper` value is different. See the following table for details:
139
163
140
164
|Versions of Git for Windows|Git Credential Manager for Windows|Git Credential Manager Core|Git Credential Manager (Renamed from GCM Core)|
0 commit comments