Skip to main content

Why is Git always asking for my password?

If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository.

Using an HTTPS remote URL has some advantages compared with using SSH. It's easier to set up than SSH, and usually works through strict firewalls and proxies. However, it also prompts you to enter your GitHub credentials every time you pull or push a repository.

Wenn Sie Git zur Eingabe Ihres Kennworts auffordert, geben Sie Ihr personal access token ein. Alternativ kann ein Hilfsprogramm für Anmeldedaten wie die Git Anmeldeinformationsverwaltung verwendet werden. Die kennwortbasierte Authentifizierung für Git wurde zugunsten sichererer Authentifizierungsmethoden aufgegeben. Weitere Informationen finden Sie unter Verwalten deiner persönlichen Zugriffstoken.

You can avoid being prompted for your password by configuring Git to cache your credentials for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.

Further reading