Github: Atom 1.18.0 - Multiple Remote Push URL's

Created on 24 May 2017  路  6Comments  路  Source: atom/github

Description

Not detecting remotes if multiple URL's are set for the same remote.

Steps to Reproduce

  1. Add an additional push URL
git remote set-url --add --push origin [email protected]:username/repo
git remote set-url --add --push origin [email protected]:username/repo2
  1. Verify it worked
    git remote -v
origin  [email protected]:username/repo (fetch)
origin  [email protected]:username/repo (push)
origin  [email protected]:username/repo2 (push)
  1. Now try to do a push from inside of Atom and you will see

Note: No remote detected for branch. Cannot push because there is no remote named "origin" for which to create a remote tracking branch.

Expected behavior:
It should work the same as running the command:

git push

Which will push it to both just fine.

Actual behavior:
It doesn't allow me to push at all.

Reproduces how often:
100% of the time. Interestingly enough though, if I only add a second remote url after I have already loaded in the repo, it will continue to allow me to push - until i close and open atom or add the repo again (at which point it detects changes the error comes).

Versions

1.18.0-beta0

bug

Most helpful comment

still same problem, has this been fixed ?

All 6 comments

Interestingly I get the same error and behaviour if I add a single remote to my local repo, but I give it an alias other than 'origin'. For example:
git remote add gh https://github.com/myuser/myrepo.git

Attempting to push within Atom gives rise to:

Note: No remote detected for branch. Cannot push because there is no remote named "origin" for which to create a remote tracking branch.

Could be related.

I'm having this error message as well when using a remote other than origin.

Yeah, getting this as well on v1.19.2

Same challenge for me on 1.19.2. My remotes are not named origin.

still same problem, has this been fixed ?

Interestingly I get the same error and behaviour if I add a single remote to my local repo, but I give it an alias other than 'origin'. For example:
git remote add gh https://github.com/myuser/myrepo.git

Attempting to push within Atom gives rise to:

Note: No remote detected for branch. Cannot push because there is no remote named "origin" for which to create a remote tracking branch.

Could be related.

I was able to get around this for now. I had to set the upstream for the branch and that worked for me. I no longer get the error about no remote named "origin"

Example:
git push -u gh <branch>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simurai picture simurai  路  3Comments

UziTech picture UziTech  路  4Comments

jazeee picture jazeee  路  3Comments

benogle picture benogle  路  4Comments

rsese picture rsese  路  4Comments