Reputation: 21
I am trying to publish a branch from Github Desktop but I get this weird error: URL using bad/illegal format or missing URL. I have searched all around the internet and can't find a solution. Does anyone know how to fix it or why this error occurs?
Upvotes: 2
Views: 25513
Reputation: 1
I had the same issue. Apparently you can use this command and it needs to be in this format, I am using an access key:
$ git remote set-url origin https://<access key>@github.com/<user name>/<reponame>.git
Try that and see if that helps.
Upvotes: 0
Reputation: 2553
I had this error because I added a bit wrong url locally to remote origin with
git remote add origin https://url:user/my-repo.git
Checked the remote origin locally and compared to cloning repo url
git remote show origin
fatal: unable to access 'https://...': URL using bad/illegal format or missing URL
I had to replace semicolon ':' with backslash '/' in front of username. Locally had to remove remote origin, then add back
git remote rm origin
git remote add origin https://url/user/my-repo.git
Upvotes: 5
Reputation: 295
Can you check the remote url of github repo? Please also check the remote name. By default it should be origin
It can be done as follows:
In your repo, run git remote -v
and match the url returned with that of the "clone" url of your repo. If its different please update it to "clone" url of your repo locally.
And then try hitting:
git push origin <branch name>
Upvotes: 2