Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Version Control System » How to fix Git always asking for my Username and Password
  • banner 3
    How to Enable or Disable SuperFetch in Windows 11 Windows
  • PRIVATE DOCKER REGISTRY
    How to Set up Private Docker Registry Containers
  • dtjdhn
    The action cannot be completed because the folder or file is open in another program: Determine where a file is open in Windows Windows
  • task manager not responding thumbnail
    Process Explorer: Replace built-in Task Manager Windows Server
  • How to Enable & Disable CTRL + ALT + DEL Secure Login on Windows 11
    How to Enable/Disable CTRL + ALT + DEL Secure Login on Windows 11/10 Windows
  • ubuntu 1479782 1280
    Ubuntu Linux post installation of Network Properties, Guest Integration and Web Administration using Cockpit Linux
  • uninstalloffice
    Remove All Microsoft Office Apps from Mac Network | Monitoring
  • UnregisterGitLabRunner
    How to unregister GitLab Runner in Windows Version Control System

How to fix Git always asking for my Username and Password

Posted on 02/08/202316/12/2025 Temitope Odemo By Temitope Odemo No Comments on How to fix Git always asking for my Username and Password
banner

In this article, I will be showing you how to fix Git always asking for my Username and Password. So many people have complained about Git asking them for their username and password each time they try to access GitHub even after configuring it. Please, see How to Set Up and Use an Upstream Branch in Git, Fix Git is not recognised as an internal or external command and How to fix fatal Git error refusing to merge unrelated histories.

This is one common issue experienced by people who use the HTTPS clone URL for their repository.

Many people find using an HTTPS remote URL easier than using SSH. Also, how it works its way through firewalls and proxies. But the issue here is that it prompts you to enter your GitHub user credentials every time you pull or push a repository.

HTTPS-on-Git

Please see How to install Git on macOS, Windows Profile: How to determine your windows username. Some Common Cisco ASA Commands, and how to clone a repository and install software from GitHub on Windows.

How to fix Git always asking for my Username and Password

Follow these steps on How to Fix Git always asking for my Username and Password.

1: Try to update the URL of the origin remote using SSH instead of using HTTPS;

git remote set-url origin git@github.com:username/repo.git

2: You can make Git store your username and password.

git config --global credential.helper store

3: You can cache or save your Username and Password for a session.

git config --global credential.helper cache

You may want to read more on Git How to Setup HTTPS users using Git credentials and Pushing Code to AWS CodeCommit, and how to lookup a username and machine name using an IP address on windows.

Set Timeout

4: You can set a timeout for the settings above.

git config --global credential.helper 'cache --timeout=600'

Immediately you do these Git will no longer be asking you for your Username and Password.

Please due to security reasons it is recommended that you use SSH to connect with GitHub. Especially when you are using another person’s system or working for your company. SSH is more secure and will not ask you to supply your credentials every time before you can connect to GitHub.

I hope you found this blog post on How to Fix Git always asking for my Username and Password interesting and helpful. In case you have any questions do not hesitate to ask in the comment section.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Version Control System Tags:Git, Git Bash, Git Clone, Git Commands, Git GUI

Post navigation

Previous Post: How to Fix “Some Settings Are Managed by Your Organization” Error in Windows Update
Next Post: How to Apply and Enable Automatic Windows Admin Center Update

Related Posts

  • Screenshot 2022 04 02 at 22.59.54
    How to fix importing the project failed: Project namespace path can contain only letters, digits, etc Version Control System
  • Screenshot 2022 03 20 at 21.08.50
    How to integrate AWS CodeBuild and AWS CodeCommit to SonarCloud AWS/Azure/OpenShift
  • Slide2
    How to Setup Jenkins Pipelines Environment for Docker Container Deployment Containers
  • BitBucket Repo
    How to create Bitbucket Repository Version Control System
  • git default branch min
    Git config –global init.defaultBranch: Error cannot lock ref ‘refs/remotes/origin/windows’, not a directory Version Control System
  • Azure DevOps Server
    How to Install Azure DevOps Server 2022 Automation

More Related Articles

Screenshot 2022 04 02 at 22.59.54 How to fix importing the project failed: Project namespace path can contain only letters, digits, etc Version Control System
Screenshot 2022 03 20 at 21.08.50 How to integrate AWS CodeBuild and AWS CodeCommit to SonarCloud AWS/Azure/OpenShift
Slide2 How to Setup Jenkins Pipelines Environment for Docker Container Deployment Containers
BitBucket Repo How to create Bitbucket Repository Version Control System
git default branch min Git config –global init.defaultBranch: Error cannot lock ref ‘refs/remotes/origin/windows’, not a directory Version Control System
Azure DevOps Server How to Install Azure DevOps Server 2022 Automation

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • banner 3
    How to Enable or Disable SuperFetch in Windows 11 Windows
  • PRIVATE DOCKER REGISTRY
    How to Set up Private Docker Registry Containers
  • dtjdhn
    The action cannot be completed because the folder or file is open in another program: Determine where a file is open in Windows Windows
  • task manager not responding thumbnail
    Process Explorer: Replace built-in Task Manager Windows Server
  • How to Enable & Disable CTRL + ALT + DEL Secure Login on Windows 11
    How to Enable/Disable CTRL + ALT + DEL Secure Login on Windows 11/10 Windows
  • ubuntu 1479782 1280
    Ubuntu Linux post installation of Network Properties, Guest Integration and Web Administration using Cockpit Linux
  • uninstalloffice
    Remove All Microsoft Office Apps from Mac Network | Monitoring
  • UnregisterGitLabRunner
    How to unregister GitLab Runner in Windows Version Control System

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,825 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.