Closed niderhoff closed 3 weeks ago
Hey @niderhoff, it looks like this might be easy to fix, we just don't have that oauth2
prefix in our regular expression currently:
re := regexp.MustCompile(`(?:^https?:\/\/|^ssh:\/\/|^git@)(?:[^\/:]+)(?::\d+)?[\/:](.*)\/([^\/]+?)(?:\.git)?$`)
You can see where this change might need to be made in cmd/app/git/git.go
and cmd/app/git/git_test.go
would you like to try making an MR to fix it? If so, you can check out the contributing file at .github/CONTRIBUTING.md
I'd fix this for you, but it'd be hard to validate for me, since I do not have this type of OAuth repository set up!
Thank you for accepting the PR. In fact this is my first time touching a Go project :)
NIce! Yeah Go is a great language. I'll close this issue but please drop a comment here if there's an issue still with the URL for you.
Prerequsities
:h gitlab.nvim.troubleshooting
and followed the steps thereSetup Configuration and Environment
Please post here the options you're passing to configure
gitlab.nvim
and specify any environment variables you're relying on.Bug Description
On every I get the following error:
gitlab.nvim: Failure initializing plugin: Invalid Git URL format: https://oauth2:<REDACTED_TOKEN>@https://<REDACTED_HOST>/<redacted group>/<redacted group>/<redacted-repo-name>/
even when I try the trouble shooting step of
The error is happening, so I expect the gitlab server is not even starting and I can't do any other trouble shooting steps.
When I change the remote url from the original format
https://oauth2:<redacted_token>@<redacted_host>/<redacted group>/<redacted group>/<redacted-repo-name>/
to
https://oauth2:<redacted_token>@<redacted_host>/<redacted group>/<redacted group>/<redacted-repo-name>
I am able to start the server, but a404
error happens.I tried the following remote-urls:
https://oauth2:<redacted_token>@<redacted_host>/<redacted group>/<redacted group>/<redacted-repo-name>/
--> "Invalid Git URL Format"https://oauth2:<redacted_token>@<redacted_host>/<redacted group>/<redacted group>/<redacted-repo-name>.git/
--> "Invalid Git URL Format"https://oauth2:<redcated_token>@<redacted_host>/<redacted group>/<redacted group>/<redacted-repo-name>
--> "Error getting project at ... 404 Not Found"https://oauth2:<redacted_token>@<redacted_host>/<redacted group>/<redacted group>/<redacted-repo-name>.git
--> "Error getting project at ... 404 Not Found"However, through my browser all of them work.
Reproduction Steps
git clone <git url>
Screenshots
...