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

Some custom git engines are not supported #3058

Closed
3 tasks done
quenbyako opened this issue Apr 21, 2022 · 8 comments · Fixed by #3088
Closed
3 tasks done

Some custom git engines are not supported #3058

quenbyako opened this issue Apr 21, 2022 · 8 comments · Fixed by #3088
Assignees
Labels
bug Something isn't working
Milestone

Comments

@quenbyako
Copy link

What happened?

We are using gerrit in our team (in legacy terms, but this is not main point), and gerrit allows to create repository links with single path item (e.g. ssh://quenbyako@git.example.com/myapp, and it's a valid git repo url). But goreleaser requires (for some reason, why?) just building task requires a valid git repo with valid remote url. Why? Who knows. But it interferes with setting up the environment with goreleaser.

How can we reproduce this?

  • setup gerrit repo (or, easier, use proxy tool like kong, traefik, etc)
  • init git repository with origin of single path item
  • boom... or not boom, but there is an error.

goreleaser version

goreleaser version 1.8.3
commit: 63436392db6ac0557513535fc3ee4223a44810ed
built at: 2022-04-20T12:43:39Z
built by: goreleaser
goos: darwin
goarch: amd64
module version: v1.8.3, checksum: h1:4vP28LV1VOL+mtEVvejCkN6KD1OU++7YNCh9dojxcO0=

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

I lied about goreleaser check shows no errors) but you know, even with error message, it's still a bug.

I also made a fix, will push it shortly

@quenbyako quenbyako added bug Something isn't working triage Issue pending triage by one of the maintainers labels Apr 21, 2022
@caarlos0
Copy link
Member

can you paste the error output?

@quenbyako
Copy link
Author

Sure, sorry that i didn't it before

$ goreleaser check
   • loading config file       file=.goreleaser.yaml
   • checking config: 
   ⨯ config is invalid error=unsupported repository URL: ssh://quenbyako@git.example.com/myapp

   ⨯ command failed            error=invalid config: unsupported repository URL: ssh://quenbyako@git.example.com/myapp

Same error for build command.

I already made #3060 pull request which fixes this problem.

@caarlos0
Copy link
Member

I don't think its that simple, this is used in other places, such as releases...

we'll likely need to provide a better error message (or warning) and disable things that might use that option if the repo does not consist in two parts.

that said, officially, goreleaser only works with github, gitlab and gitea... so we'll need to look into how much it makes sense to dedicate time looking into this...

@quenbyako
Copy link
Author

quenbyako commented Apr 26, 2022

I don't want to argue with you (it's honestly, goreleaser helped me a lot), but i think that this tool could be more flexible without concentrating on git hub/lab/ea. Show warning instead of silent pass through is a good thing, cause in most of cases, urls like this sounds definitely like error. but not in all cases, you know)

I want to contribute a bit, so maybe we can find a way how to deal with this issue (cuz i don't want to fork whole project for this tiny problem)

@caarlos0
Copy link
Member

not arguing, just saying it might not be trivial to do so, although yeap it would be cool...

one possible workaroud is to set a fake a git url and disable some pipes (release, brew, etc), it should work then, I believe

if that works, we might be able to merge something similar to your pr, but with a big warning instructing that things might break, and what those things are

caarlos0 added a commit that referenced this issue May 9, 2022
basically allows to use goreleaser against a repo with a git url without both owner and repo name.

closes #3060
closes #3058

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
@caarlos0
Copy link
Member

caarlos0 commented May 9, 2022

possible fix: #3088

@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label May 9, 2022
@caarlos0 caarlos0 added this to the v1.9.0 milestone May 9, 2022
@quenbyako
Copy link
Author

@caarlos0 #3088 is working as expected, in our case this issue is fixed with that patch, thank you so much again!

caarlos0 added a commit that referenced this issue May 9, 2022
basically allows to use goreleaser against a repo with a git url without both owner and repo name.

closes #3060
closes #3058

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants