0

I am a beginner in Git I get this strange behavior :

1 / When i push some code, Git says '=' is not an URL !!

git push -u origin master
---> fatal: '=' does not appear to be a git repository

2 / So i check the config, and i see 2 "push" URLs are equal to "="

git config --list
---> ... 
remote.origin.url== 
remote.origin.url== 
[email protected]:<name>/<project>.git (push)
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

How can i correct that error ??? the.git/config file seems to be normal

1
  • Those are, technically, fetch URLs rather than (or in addition to) push URLs. However, there should normally only be one URL, or at most two URLs, for any given repository. The extra ones you show here are not empty: they are set to the equal sign =. Delete the wrong ones from whichever files they appear in, as in 1615903's answer. Commented Feb 24, 2022 at 13:26

2 Answers 2

3

First, use git config --list --show-origin to determine where the empty values come from, output will be something like this:

file:.git/config                remote.origin.url== 
file:/other/directory/config    remote.origin.url==

Then remove the config lines from those files.

Sign up to request clarification or add additional context in comments.

Comments

0

Edit .git/config to remove two blank URLs.

[remote "origin"] // Search this section.

Notice: .git is a hidden folder in your project root directory.

1 Comment

Thanks, but this file seems to be ok ;[remote "origin"] url = [email protected]:ericdumond/OpenClassroomProject.git fetch = +refs/heads/*:refs/remotes/origin/*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.