Friday, April 8, 2022

[SOLVED] Git : Ubuntu: Url has no scheme

Issue

Everything was working fine on my digitalocean droplet where i have laravel applicaton deployed, and today when i tried to do "git pull" i just received :

root@ubuntu-s-1vcpu-2gb-nyc3-01:/var/www/html# git pull
warning: url has no scheme:
fatal: credential url cannot be parsed:
root@ubuntu-s-1vcpu-2gb-nyc3-01:/var/www/html#

Any idea how can i fix this? I tryed apt-get remove git & then apt-get install git. That did not help

Thanks!


Solution

You're seeing this problem because your URL has no scheme. In a URL like https://github.com/git/git.git, the scheme is the https portion. When you try to do a pull, you're invoking the credential helper to get credentials, and as of the recent security update, not specifying a scheme is a fatal error.

If you want to use an HTTPS URL, then you need to specify a full, valid URL, including the scheme, which you can do with a command like the following:

git remote set-url origin https://github.com/djokicpn/MyRepoHere


Answered By - bk2204
Answer Checked By - Senaida (WPSolving Volunteer)