Why I have to enter password everytime when I try to clone the private repository
Asked by Muhammad Arslan:

I have installed the new windsows10. I have created an new app password. But when I try to clone push or pull from a repository it ask for password every time.

My git version is "git version 2.40.0.windows.1"


Answers:
author: Patrik S
body: Hello [@Muhammad Arslan](/t5/user/viewprofilepage/user-id/5184796) ,

Welcome to Atlassian Community!

Just adding to [@marc -Collabello--Phase Locked-](/t5/user/viewprofilepage/user-id/1205132) comment, git by default does not cache the credentials for authentication, and this is most likely the reason why you are being asked to input your credentials in every git operation that interacts with bitbucket (push,pull,fetch,clone).

If you have downloaded git for windows from its official download page ([Git for Windows](https://git-scm.com/download/win)), the installer should have come with Git Credential Manager (GCM), which is a git credential helper that securely stores the credentials in cache.

If you have disabled the installation of GCM when you installed git, you can manually download and install GCM following the instructions in [this documentation.](https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/install.md)

Once GCM is installed, the next time you execute a git operation, it will prompt you for the credentials and then save it on GCM cache. For any subsequent git command, git will get the credentials from GCM cache and you will not need to provide it again.

Hope that helps! Let me know in case you have any questions.

Thank you, [@Muhammad Arslan](/t5/user/viewprofilepage/user-id/5184796) !

Patrik S

comments: author: Muhammad Arslan
body: I think GCM is installed. Github does not ask for password every time on the same git installation.

For bitbucket its started to ask for the App password everytime when installed new windows and set up the git.


author: Patrik S
body: Hey [@Muhammad Arslan](/t5/user/viewprofilepage/user-id/5184796) ,

Could you please share with us the output of the following command when executed in a Git Bash terminal?

```
git config --get-all --show-scope --show-origin credential.helper
```

This should print what is the current credential helper configured in your system at multiple scopes (local, global, system). If GCM is installed in the machine, we would expect the output of this command to return something like *git-credential-manager.*


author: Muhammad Arslan
body: [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) Here is the result

```
$ git config --get-all --show-scope --show-origin credential.helper
system file:C:/Program Files/Git/etc/gitconfig manager
global file:C:/Users/Arslan/.gitconfig wincred
```


author: Patrik S
body: Hello [@Muhammad Arslan](/t5/user/viewprofilepage/user-id/5184796) ,

Looks like your global git configuration is trying to use wincred, instead of GCM, as the credential helper.

In this case, could you please run the following command to set the manager as the credential helper at the global level?

```
git config --global credential.helper manager
```

Once you execute that command, you can try testing a git command and check if you are still being prompted for credentials. Please note that after you do the change, the first time you execute the git command it's expected that you will still be asked for credentials, it will only be cached in the subsequent git commands.

Thank you, [@Muhammad Arslan](/t5/user/viewprofilepage/user-id/5184796) !

Patrik S


author: marc -Collabello--Phase Locked-
body: Git asking for a password every time is a feature of git.

comments: author: Muhammad Arslan
body: Than how can I disable it. because its annoying to enter App password everytime


Tags: bitbucket-cloud

cloud