Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal: unable to connect to github when running gatsby new #2931

Closed
jaegz opened this issue Nov 15, 2017 · 4 comments
Closed

fatal: unable to connect to github when running gatsby new #2931

jaegz opened this issue Nov 15, 2017 · 4 comments

Comments

@jaegz
Copy link

jaegz commented Nov 15, 2017

I'm looking to give gatsby a test drive and was following the tutorial, but ran into an issue when running the following command:

gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world

output

λ gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world
info Creating new site from git: git://github.com/gatsbyjs/gatsby-starter-hello-world.git
Cloning into 'tutorial-part-one'...
fatal: unable to connect to github.com:
github.com[0: 192.30.253.112]: errno=No error
github.com[1: 192.30.253.113]: errno=No error

error Command failed: git clone git://github.com/gatsbyjs/gatsby-starter-hello-world.git tutorial-part-one --single-branch


  Error: Command failed: git clone git://github.com/gatsbyjs/gatsby-starter-hello-world.git tutorial-part-one --single-branch

  - index.js:236 Promise.all.then.arr
    [npm]/[gatsby-cli]/[execa]/index.js:236:11

  - util.js:16 tryCatcher
    [npm]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23

  - promise.js:512 Promise._settlePromiseFromHandler
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31

  - promise.js:569 Promise._settlePromise
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18

  - promise.js:614 Promise._settlePromise0
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10

  - promise.js:693 Promise._settlePromises
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:693:18

  - promise.js:638 Promise._fulfill
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:638:18

  - promise_array.js:126 PromiseArray._resolve
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:126:19

  - promise_array.js:144 PromiseArray._promiseFulfilled
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:144:14

  - promise.js:574 Promise._settlePromise
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:574:26

  - promise.js:614 Promise._settlePromise0
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10

  - promise.js:693 Promise._settlePromises
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:693:18

  - async.js:133 Async._drainQueue
    [npm]/[gatsby-cli]/[bluebird]/js/release/async.js:133:16

  - async.js:143 Async._drainQueues
    [npm]/[gatsby-cli]/[bluebird]/js/release/async.js:143:10

  - async.js:17 Immediate.Async.drainQueues
    [npm]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14

system info
win7 64bit
node 8.9.1
npm 5.0.3
gatsby 1.1.20

@jaegz
Copy link
Author

jaegz commented Nov 16, 2017

Upon further inspection the network/firewall settings didn't want to resolve git:// so I updated my git config to use https instead:

git config -g url."https://".insteadOf git://

So now I can connect to github, but now I am running into this yarn error:

λ gatsby new gatsby-site
info Creating new site from git: git://github.com/gatsbyjs/gatsby-starter-default.git
Cloning into 'gatsby-site'...
remote: Counting objects: 626, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 626 (delta 11), reused 14 (delta 6), pack-reused 607
Receiving objects: 100% (626/626), 585.53 KiB | 511.00 KiB/s, done.
Resolving deltas: 100% (355/355), done.
success Created starter directory layout
info Installing packages...
yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
warning gatsby > [email protected]: �  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz: self signed certificate in certificate chain".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\jaegz\\netlify\\gatsby-site\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed: yarnpkg

  Error: Command failed: yarnpkg

  - index.js:236 Promise.all.then.arr
    [npm]/[gatsby-cli]/[execa]/index.js:236:11

  - util.js:16 tryCatcher
    [npm]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23

  - promise.js:512 Promise._settlePromiseFromHandler
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31

  - promise.js:569 Promise._settlePromise
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18

  - promise.js:614 Promise._settlePromise0
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10

  - promise.js:693 Promise._settlePromises
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:693:18

  - promise.js:638 Promise._fulfill
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:638:18

  - promise_array.js:126 PromiseArray._resolve
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:126:19

  - promise_array.js:144 PromiseArray._promiseFulfilled
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:144:14

  - promise.js:574 Promise._settlePromise
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:574:26

  - promise.js:614 Promise._settlePromise0
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10

  - promise.js:693 Promise._settlePromises
    [npm]/[gatsby-cli]/[bluebird]/js/release/promise.js:693:18

  - async.js:133 Async._drainQueue
    [npm]/[gatsby-cli]/[bluebird]/js/release/async.js:133:16

  - async.js:143 Async._drainQueues
    [npm]/[gatsby-cli]/[bluebird]/js/release/async.js:143:10

  - async.js:17 Immediate.Async.drainQueues
    [npm]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14

@KyleAMathews
Copy link
Contributor

self signed certificate in certificate chain

^^^ makes it sound like more firewall trouble e.g. your firewall is inserting its own cert.

@jaegz
Copy link
Author

jaegz commented Dec 6, 2017

Thanks, took another stab at this today on the windows machine and got it to work.
Indeed it was a network issue - setting yarn's config to: yarn config set "strict-ssl" false solved everything.

@jaegz jaegz closed this as completed Dec 6, 2017
@abhinavjonnada82
Copy link

abhinavjonnada82 commented Mar 31, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants