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

  1. Go to the main screen.
  2. Click on Fetch Origin
  3. 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

screenshot 1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 29
  • Comments: 57 (18 by maintainers)

Commits related to this issue

Most upvoted comments

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:

git config --unset --global credential.helperselector

on the command-line, or remove the lines

[credential "helperselector"]
	selected = manager

Still looks like a bug to me.

@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).

@Aravind-Belagaje thank you for posting this! Now it all makes sense.

To fix this in your setup, simply run:

git config --unset --global credential.helperselector

on the command-line, or remove the lines

[credential "helperselector"]
	selected = manager

Thanks, it looks like removing

[credential "helperselector"]
	selected = manager

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:

[credential "helperselector"]
	selected = manager

to

[credential "https://url_without_scheme"]
	selected = manager

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 .gitmodules or from .gitconfig, does not matter) used incomplete URLs which would be mistaken e.g. by git-credential-osxkeychain for wildcards. That is, a URL of the form https:///path would 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.

Getting similar issue: image GitHub Desktop Version: 2.4.2 Windows 10 Pro - 18363.720

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.

warning: url has no scheme: ? fatal: credential url cannot be parsed: ?

@rabrahamOpti could you have a look whether the ~/.git-credentials file maybe contains a line that has a single question mark in it? Or anything else with a question mark in a funny spot?

@dscho I RDPed into the appveyor VM and inspected ~/.git-credentials. I do not see any ? characters. This is what the file looks like (anonymized with {username} {password}, and {APIM Tenant}):

https://{username}:{password}@{APIM Tenant}.scm.azure-api.net/

https://{username}:{password}@{APIM Tenant}.scm.azure-api.net/

https://{username}:{password}@{APIM Tenant}.scm.azure-api.net/

The passwords are URL encoded, and contain %26, %2b, %3d and %2f

@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 manager followed by git config --global --unset credential.helperselector.selected. The first invocation should do the same as selecting the manager in the helper and checking the Always use this from now on checkbox. 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:

warning: url has no scheme: 
fatal: credential url cannot be parsed: 
Already up to date.

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:

[credential]
        helper = store

and then my ~/.git-credentials file has a single entry of the form, https://<git-username>:<git-token>@github.com

@narasimhamurthyss @giorgoc your issue seems to be a different one. Can you look whether you have any entries either in your user-wide config, or in .gitmodules, that has microsoft.visualstudio.com in double-quotes, where that should maybe be a fully-qualified URL (i.e. with protocol, i.e with the https:// prefix)?

It’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:

warning: url has no scheme: ?
fatal: credential url cannot be parsed: ?