jen
February 13, 2020, 11:06pm
3
Hey, @yag and @ada_1 . Sorry to hear you’re both running into this To be honest, I’m not positive what the problem is, but wanted to share a possibly related post below in case it’s helpful:
Hi, Thanks for the updates. Really sorry for the trouble. I’m passing this thread along to our CLI team so they can get this documented better.
I’m also linking to an issue in the netlify-cli repo which may be related:
opened 07:41PM - 22 Aug 19 UTC
closed 03:13PM - 03 Dec 20 UTC
type: bug
area: command: init
area: command: sites
Issue with git remote parsing logic
0. User has a private bitbucket server, w… ith .git/config remote: url = ssh://git@bitbucket.companyxyz.com/~steve.steve/netlify-test.git
1. user uses `netlify init --manual` and we create a repo with a bad spec: Repo.path is set to ~steve.steve/netlify-test.git meaning we don't try to reach his server when cloning and fail
2. user uses `netlify sites:create --manual --with-ci` and it works correctly, setting Repo.path to git@bitbucket.companyxyz.com:~steve.steve/netlify-test.git which works well.
---
It would appear that `init` and `sites:create` are using a slightly different `git remote` parsing mechanism.
one uses `parseGitRemote` https://github.com/netlify/cli/blob/master/src/commands/sites/create.js#L119 looks like its working and the other uses `getRepoData` https://github.com/netlify/cli/blob/master/src/commands/init.js#L61 which appears to not be working
The git remote parsing logic appears to be different for each.
It appears that the parsing logic for `netlify sites:create --manual --with-ci` is working correctly in the scenario above
Based on that issue, do you want to give netlify sites:create --manual --with-ci
a shot and let me know if that fixes things for you?