Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported git service (after renaming remote name) #3997

Open
rabin-io opened this issue Oct 18, 2024 · 2 comments · May be fixed by #4026
Open

Unsupported git service (after renaming remote name) #3997

rabin-io opened this issue Oct 18, 2024 · 2 comments · May be fixed by #4026
Labels
bug Something isn't working

Comments

@rabin-io
Copy link

rabin-io commented Oct 18, 2024

Describe the bug
My setup used to work, so when I pressed o to open an MR with GitLab, but since I renamed the remote from origin to a different name, I get this error now.

To Reproduce

  1. Clone the repo
  2. Add 2nd remote (my fork)
  3. Rename origin to something else
  4. Try to create MR with o
services:
  'gitlab.exmaple.com': gitlab:gitlab.example.com

Expected behavior
The MR url should open in my default browser

Version info:

❯ lazygit --version
commit=611fabde11d24d9acc71ee26077b9a1101f59f27, build date=2024-09-18T10:56:10Z, build source=binaryRelease, version=0.44.1, os=linux, arch=amd64, git version=2.47.0

❯ git --version
git version 2.47.0

Additional context
When I run lazygit with -debug in the logs output, I still see lazygit try to use the origin remote name

...
Oct 18 03:36:37 |DEBU| time to get behind base branch values for all branches: 49.980564ms 
Oct 18 03:36:40 |DEBU| RunCommand command="git ls-remote --get-url origin"
Oct 18 03:36:40 |INFO| git ls-remote --get-url origin (2.410547ms) 
❯ git remote -v
contra      [email protected]:contra/repo1.git (fetch)
contra      [email protected]:contra/repo1.git (push)
rabin-io    [email protected]:rabin-io/repo1.git (fetch)
rabin-io    [email protected]:rabin-io/repo1.git (push)
@rabin-io rabin-io added the bug Something isn't working label Oct 18, 2024
@kevinrobayna
Copy link

kevinrobayna commented Oct 24, 2024

I have the exact same issue and I'm also in the latest version, although in my case i still use origin as the name of remote.

$ git remote -v
origin  [email protected]:Company/Team/Project.git (fetch)
origin  [email protected]:Company/Team/Project.git (push)

$ lazygit --version
commit=, build date=, build source=homebrew, version=0.44.1, os=darwin, arch=arm64, git version=2.47.0
image

@BElluu
Copy link

BElluu commented Nov 2, 2024

There's problem. We have hardcoded "origin" :D
image

I try fix this :)

@BElluu BElluu linked a pull request Nov 2, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants