user379888
user379888

Reputation:

No such remote origin while multiple push

I came across a way to push to multiple repositories at the same time, enter image description here

Here is what I am trying to do,

$ git remote set-url --add --push origin https://github.com/FahadUddin92/Multiple-Push.git

I am getting the below error,

fatal: No such remote 'origin'

Upvotes: 1

Views: 2894

Answers (1)

Kewin Dousse
Kewin Dousse

Reputation: 4027

The error message tells that there's currently no remote named origin. You're trying to add an url to an existing remote, so you'll need to create it first.

Taking your example, to make it work you'll first need to create the remote using git remote add :

git remote add origin [email protected]:USERNAME/REPO-1.git

And only then, add the second url to that created remote :

git remote set-url --add --push origin [email protected]:USERNAME/REPO-2.git

Upvotes: 4

Related Questions