Skip to content

Commit 3510f4b

Browse files
authored
Merge pull request #8483 from sevend2/devopsSeven
AB#1963: Update as per CI1963 Merge this PR as per Deepak Mittal
2 parents 50a413a + 29f3619 commit 3510f4b

1 file changed

Lines changed: 37 additions & 13 deletions

File tree

support/azure/devops/git-clone-push-operation-failing-devops-repo.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Git clone or Git push fails to an Azure DevOps repository
33
description: This article discusses problems that might occur when you try to perform Git clone or Git push function to an Azure DevOps repository.
44
author: HaiyingYu
55
ms.author: haiyingyu
6-
ms.reviewer: kirt
6+
ms.reviewer: kirt, dmittal
77
ms.topic: troubleshooting
8-
ms.date: 05/19/2023
8+
ms.date: 03/24/2025
99
ms.service: azure-devops
1010
ms.custom: sap:Repos
1111
---
@@ -42,7 +42,7 @@ To learn more about Git environment variables, see [Git Internals - Environment
4242

4343
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`".
4444

45-
### Solution: Configure Git to use the proxy server
45+
### Recommendation: Configure Git to use the proxy server
4646

4747
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.
4848

@@ -65,13 +65,13 @@ For more information on Git configuration, see [Git Config Documentation](https:
6565

6666
If Git is using a local self-signed certificate, you might see the error "SSL certificate problem: unable to get local issuer certificate."
6767

68-
### Solution 1: Disable the TLS/SSL verification
68+
### Recommendation 1: Disable the TLS/SSL verification
6969

7070
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:
7171

7272
`git config --global http.sslVerify false`
7373

74-
### Solution 2: Configure the self-signed certificates in Git
74+
### Recommendation 2: Configure the self-signed certificates in Git
7575

7676
If you want to continue the TLS/SSL verification that Git does, follow these steps to add the root certificate in the local Git:
7777

@@ -122,20 +122,44 @@ If you want to continue the TLS/SSL verification that Git does, follow these ste
122122

123123
If your account name or domain password has changed, or you're getting an authentication error, there could be authentication and credential cache issues.
124124

125-
### Solution: Reset the Git credentials manager (GCM)
125+
### Recommendation: Reset the Git credentials manager (GCM)
126126

127127
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:
128128

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:
131131
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>`.
148+
149+
- On MacOS:
150+
151+
- `git credential reject https://dev.azure.com/<orgname>`
152+
153+
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+
136159
1. Perform the cloning operation to verify if the issue is resolved.
137160

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:
139163
140164
|Versions of Git for Windows|Git Credential Manager for Windows|Git Credential Manager Core|Git Credential Manager (Renamed from GCM Core)|
141165
|--|--|--|--|

0 commit comments

Comments
 (0)