question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

simplified git config causes remote upstream rewrite on every run

See original GitHub issue

If I use a simple config entry like:

~/test/cvspull:
  mypackage: 'git+ssh://git@gitlab.com/mygroup/mypackage.git'

I always see the line about Updating remote origin:

Updating remote origin (ssh://git@gitlab.com/mygroup/mypackage.git) with git+ssh://git@gitlab.com/mygroup/mypackage.git

which then in turn causes a retry of the update.

To fix this issue I have to use a config like this:

~/test/cvspull:
  mypackage:
    url: 'git+ssh://git@gitlab.com/mygroup/mypackage.git'
    remotes:
      origin: 'ssh://git@gitlab.com/mygroup/mypackage.git'

This then works, but I would like to have a more compact/simplified config with only one line per repo.

(repogroup and name have been abstracted, as the used gitlab is internal 😉 )

Best regards Segaja

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
aschleifercommented, Mar 2, 2022

@tony just a headsup: since now the new structure is in, i will wait for this fix before i look at the add command and into moving the gitlab generator script into the actual package.

1reaction
aschleifercommented, Feb 25, 2022

@tony once this bug is fixed I’m happy to fix the new scripts to use the simplified configuration again. But you can also do it in the same PR where you fix this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git - Why do I need to do `--set-upstream` all the time?
The default for branch.autosetupmerge means that the upstream configuration for a new branch is only automatically set when creating a branch ...
Read more >
2.5 Git Basics - Working with Remotes
To see which remote servers you have configured, you can run the git remote command. It lists the shortnames of each remote handle...
Read more >
Git Forks and Upstreams: How-to and a cool tip
Git upstreams are key to keeping track of project changes. Our tutorial will get you started using git upstream and forks to maintain...
Read more >
How to push new Git branches to remote repos on GitHub ...
Clone the remote Git repo locally · Create a new branch with the branch, switch or checkout commands · Perform a git push...
Read more >
Getting started with Git and AWS CodeCommit
Run git config to add your user name and email address represented by ... default remote name Git uses for your CodeCommit repository...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found