Reputation: 5148
$ git ls-remote
results in
fatal: No remote configured to list refs from.
I have remotes defined
$ git remote
results in
personal_remote
upstream
Upvotes: 4
Views: 8655
Reputation: 1
I stumbled across this one just now.
Basically, if you didn't push the current branch yet, then git will give you the error message. goreleaser
merely repeats it.
Once you pushed the branch to a remote, it should work:
git push -u github <branch-name>
Upvotes: 0
Reputation: 382
first git init it directory, then git clone the rep ../../something.git then go into that folder , then try git ls-remote. it should be good.
Upvotes: 1
Reputation: 599
If using git
from VS Developer Command Prompt, it helps to change directory to the root of the git
repository, i.e. the folder that contains the .git
folder.
Running the git ls-remote
command from there will pick up the remote repository from the directory.
Upvotes: 0
Reputation: 51
We can provide remote in the command:
git ls-remote personal_remote
Command worked for me on git version 1.9.1
Upvotes: 5
Reputation: 60555
I can get this behavior in repos that have no origin
remote. You can supply an alternate default remote name by setting remote.pushDefault
.
Upvotes: 4