Issue with git remote parsing logic
-
User has a private bitbucket server, with .git/config remote: url = ssh://git@bitbucket.companyxyz.com/~steve.steve/netlify-test.git
-
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
-
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
Issue with git remote parsing logic
User has a private bitbucket server, with .git/config remote: url = ssh://git@bitbucket.companyxyz.com/~steve.steve/netlify-test.git
user uses
netlify init --manualand 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 failuser uses
netlify sites:create --manual --with-ciand it works correctly, setting Repo.path to git@bitbucket.companyxyz.com:~steve.steve/netlify-test.git which works well.It would appear that
initandsites:createare using a slightly differentgit remoteparsing mechanism.one uses
parseGitRemotehttps://github.com/netlify/cli/blob/master/src/commands/sites/create.js#L119 looks like its working and the other usesgetRepoDatahttps://github.com/netlify/cli/blob/master/src/commands/init.js#L61 which appears to not be workingThe git remote parsing logic appears to be different for each.
It appears that the parsing logic for
netlify sites:create --manual --with-ciis working correctly in the scenario above