desktop: GitHub Desktop unable to fetch ("url has no scheme")
Update: This has been fixed for Windows in the latest release of Desktop (production v2.4.3 and beta v2.4.4-beta0). We are still investigating a fix for macOS.
Describe the bug
I cannot seem to fetch origin ever since the update to Github Desktop recently, every time I attempt to do this, I get the following error message: warning: url has no scheme: helperselector fatal: credential url cannot be parsed: helperselector
Version & OS
Github Desktop Version 2.4.2 Windows 10 Home - Build 18363.889
Steps to reproduce the behavior
- Go to the main screen.
- Click on Fetch Origin
- See error
Expected behavior
I expected to fetch origin.
Actual behavior
Github spits out an error message. I’m very unsure on what the next steps to do since using other git UI applications seem to work properly, and previous versions of github desktop on a different computer works properly, so something must have changed in this version that causes it to suddenly stop working. I’ve already logged in and out of Github several times, reinstalled Github Desktop a few other times, but I still run into this issue.
Screenshot of Error Message

About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 29
- Comments: 57 (18 by maintainers)
Commits related to this issue
- Use LF for EOL in CI Git credentials file https://github.com/desktop/desktop/issues/9597#issuecomment-626830296 — committed to atifaziz/CSharpMinifierDemo by atifaziz 4 years ago
- Make sure no newline is added to .git-credentials - caused failing CI builds due to failed git access for gh-pages branch - introduced by a security patch in git, see for example https://github.com... — committed to svg-net/SVG by mrbean-bremen 4 years ago
Found a solution that worked for me.
Open your .gitconfig (Under
C:\Users\<username>) and if you have an entry[credential "url_without_scheme"]change it for
[credential "https://url_without_scheme"]That fixed it for me. It can help the investigation and might fix it for you!
@Aravind-Belagaje thank you for posting this! Now it all makes sense.
To fix this in your setup, simply run:
on the command-line, or remove the lines
@dima-y Yes. To make it clear: we are treating it exactly this way: this is a bug. There are already patches being discussed on the Git mailing list to fix this. We try to move as fast as we can to fix this (without risking breaking more stuff).
Thanks, it looks like removing
solved the issue for me
Well, it looks like replacing the lines as mentioned by @koide in https://github.com/desktop/desktop/issues/9597#issuecomment-617745963 as shown below:
to
seems to have fixed my issue as well. (I just got up, I’m surprised this issue blew up.) Looks like doing that has fixed the issue.
Longer explanation, for those who are interested in details: in Git for Windows v2.23.0, we introduced a meta credential helper, i.e. a credential helper that would enumerate all credential helpers available on the search path, and list them and let the user choose.
Now, to remember what the user chose, we persist that choice under the key
credential.helperselector.selected.The fixes in Git v2.26.2 (and in the backports) for CVE-2020-11008 address problems where URL-specific credential settings (whether from
.gitmodulesor from.gitconfig, does not matter) used incomplete URLs which would be mistaken e.g. bygit-credential-osxkeychainfor wildcards. That is, a URL of the formhttps:///pathwould trick susceptible credential helpers into giving up passwords for some random host. As a consequence, v2.26.2 (and those backports) really clamp down on incomplete URLs.The problem now is that the meta credential helper uses a naming scheme in the Git config that Git mistakes for such a credential setting. It is obviously not that, but Git does not know that. So it wants to verify that the double-quoted parts in
[credential "helperselector"]are a valid URL, and otherwise exit with error.I have downloaded 2.4.1 from https://www.techspot.com/downloads/6741-github-desktop.html
You can install it over your existing installation it will not delete any settings. The only problem is that it automatically downloads the new version (2.4.2) but good news is that the update is not applied unless you restart the app.
so you can work this solution, at least temporarily.
@dscho It appears that the newlines in that file are triggering this bug. Another AppVeyor user ran into this, and found that eliminating extra newlines allowed his builds to succeed. I updated my configuration to mimic his work-around and am also no longer experiencing this bug.
@dscho FWIW, in my case the problem was caused by TWO empty lines at the end of
~/.git-credentials, and the “fix” was to remove the extra empty line.@GeneralSoundwave please run
git config --global credential.helper managerfollowed bygit config --global --unset credential.helperselector.selected. The first invocation should do the same as selecting themanagerin the helper and checking theAlways use this from now oncheckbox. The second invocation will let GitHub Desktop fetch again.Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic Git: 2.17.1
only occurs for me on a
git pull:of note is that if there are changes to pull, my local git updates with those changes, even with the error. creating a new branch, pushing, and getting status do not seem to produce the error for me.
in my ~/.gitconfig file, i have this section at the end:
and then my ~/.git-credentials file has a single entry of the form,
https://<git-username>:<git-token>@github.comIt’s exactly the same problem as the others reported. So , the solution was to replace
[credential "helperselector"]by
[credential "https://url_without_scheme"]at the .gitconfig file under
C:\Users\<username>directory.
Hi, we are getting the same error after updating to version 2.4.2
@outofambit Thanks, will do. BTW, FWIW, I ‘fixed’ this by removing the ‘[credential]’ entry also from my local .git/config. Still looks like a bug to me.
hey all, we are still looking into this! thank you for being so patient. we are evaluating some different fixes and hope to be able to patch this early next week.
as we understand it right now, its an issue in git v2.23.3 for both mac and windows users, but seems to be more common for windows users due to some complicating factors in git4windows and other config settings that are more common in windows environments.
If you’re experiencing this issue, please comment saying so and include your OS version! We want to be sure we’re tracking how many people are affected by this.
I have the same issue but my commandline git is still working though. Happened right after 2.4.2 upgrade.
git version 2.18.0.windows.1
Even I am facing same issue. I had a older version installer. after uninstalling new version and installing old version fixed the issue
Github Desktop Version 2.4.2 Windows 10 Home - 18363.720
I recently retried using Github desktop and it is working fine now. Previously it gave me the error and I didn’t change anything in my git config.
I use AppVeyor as my CI solution. Part of that build process uses git-credential store to store access tokens the build needs to pull down an Azure hosted git repo for an APIM tenant.
An access token with this format:
https://username:password@{name}.scm.azure-api.net/is manifesting the error being discussed in this issue, as of Git for Windows 2.26.2: