在公司防火墙后面运行Gatsby cli

时间:2017-10-25 02:11:37

标签: gatsby

我无法使用gatsby cli克隆gatsby-starter-default.git,因为它正在使用被我们的防火墙规则阻止的'git'网址

我尝试将以下内容添加到git配置中,但仍然没有快乐

git config --global url。“https://”.insteadOf git://

以下是输出......

gatsby new gatsby-site
2017-10-24T20:57:34-0500 <log> init-starter.js:107 (clone) Cloning git repo git://github.com/gatsbyjs/gatsby-starter-default.git to gatsby-site...
2017-10-24T21:00:04-0500 <error> new.js:12 () Error: Git clone error: Cloning into 'gatsby-site'...
fatal: unable to access 'https://github.com/gatsbyjs/gatsby-starter-default.git/': Failed to connect to github.com port 443: Operation timed out

有没有办法强制cli使用https://而不是git://

2 个答案:

答案 0 :(得分:3)

直接克隆启动器。

gatsby new是一种便利,但不是必需的。它的作用是:

  1. 浅克隆回购
  2. 删除.git目录(这样你就不会受到首发的git历史记录的影响)
  3. 运行npm或yarn install

答案 1 :(得分:2)

是。根据{{​​3}}文档,您可以将URL设置为参数:

gatsby new gatsby-site http://github.com/gatsbyjs/gatsby-starter-default.git