Closed flegall closed 6 years ago
should a fairly harmless change I think? Care to send a PR? :)
yes PR is on the way :)
Actually, I don't think we need to change anything in gatsby
Git already provides a way to rewrite urls :
git config --global url."https://github.com".insteadOf git://github.com
(The trick was found on https://stackoverflow.com/questions/21260689/force-bundle-install-to-use-https-instead-of-git-for-github-based-gems )
Let's just close this issue :)
For me the above command didnt work, but the below command did the trick,
git config --global url."https://github.com/".insteadOf "git@github.com:"
All this can be solved........... By two simple steps actually three: 1.) Open GIT BASH 2.) Type the command: gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-hello-world... 3.) And from your TERMINAL type gatsby develop
Description
When initiating a project with the gastby new command, the project could be cloned with https, as in some environments/companies cloning using git/ssh is not supported.
Environment
Gatsby version: 1.1.28 Node.js version: v8.9.1 Operating System: Windows 7 SP1
Actual result
The error message is correct, there is no access to github directly as all traffic goes through an http proxy.
Expected behavior
https should be used to clone the starter as it works everywhere instead of git.
Steps to reproduce
1. Set up an environment where you cannot access to github.com with ssh/git
2. Run gatsby new gatsby-site
Suggested change
Replace hostInfo.git() by hostinfo.https() in https://github.com/gatsbyjs/gatsby/blob/af5c9c86a604d2f6d441a793d1df3cd7b2cba793/packages/gatsby-cli/src/init-starter.js#L69