cli
cli copied to clipboard
GitLab repo URL not being parsed correctly
Describe the bug:
A user reported this on the forums.
Some context (internal only): https://netlify.slack.com/archives/CTCRT6VB6/p1638378975004800 and https://netlify.slack.com/archives/C012GT6MYKU/p1638380300316300
When connecting a repo using CLI, the repo URL is probably not parsed correctly. I was able to reproduce this with GitLab, but it could be happening with other Git hosts too.
The error is visible when the site card like this:
links the text [email protected]:hrishikeshk/test.git
to https://app.netlify.com/sites/zen-wiles-50eb6a/[email protected]:hrishikeshk/test.git
. In other cases, it links to the repo.
To reproduce:
- Create a basic repo. Could be having just 1 file too, that's not important. Publish it to GitLab.
- Run
netlify init
and choose to create a new site. Follow the prompts in the terminal. - Once all done, run
netlify open
to go to the admin area of the site and see the error.
Configuration:
System:
OS: macOS 12.0.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 796.11 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
npmPackages:
netlify-cli: ^8.0.15 => 8.0.15
Expected behavior
The link should go to the repo.
I have this same issue when trying to use netlify-cli init for newly created gitlab repo.