Search code examples
gitls-remote

git ls-remote returns "fatal: No remote configured to list refs from."


$ git ls-remote 

results in

fatal: No remote configured to list refs from.

I have remotes defined

$ git remote

results in

personal_remote
upstream

Solution

  • I can get this behavior in repos that have no origin remote. You can supply an alternate default remote name by setting remote.pushDefault.