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: Could not read from remote repository. #3713

Closed
yadavshashank opened this issue Jan 26, 2018 · 8 comments
Closed

fatal: Could not read from remote repository. #3713

yadavshashank opened this issue Jan 26, 2018 · 8 comments

Comments

@yadavshashank
Copy link

Description

Started with Gatsby tutorial today, but i can't continue because of this error:

>gatsby new gatsby-site
info Creating new site from git: git@github.com:gatsbyjs/gatsby-starter-default.git
Cloning into 'gatsby-site'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error Command failed: git clone git@github.com:gatsbyjs/gatsby-starter-default.git gatsby-site --single-branch


  Error: Command failed: git clone git@github.com:gatsbyjs/gatsby-starter-default.git gatsby-site --single-branch
  
  - index.js:236 Promise.all.then.arr
    [lib]/[gatsby-cli]/[execa]/index.js:236:11
  
  - util.js:16 tryCatcher
    [lib]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23
  
  - promise.js:512 Promise._settlePromiseFromHandler
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31
  
  - promise.js:569 Promise._settlePromise
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18
  
  - promise.js:614 Promise._settlePromise0
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10
  
  - promise.js:693 Promise._settlePromises
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:693:18
  
  - promise.js:638 Promise._fulfill
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:638:18
  
  - promise_array.js:126 PromiseArray._resolve
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:126:19
  
  - promise_array.js:144 PromiseArray._promiseFulfilled
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:144:14
  
  - promise.js:574 Promise._settlePromise
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:574:26
  
  - promise.js:614 Promise._settlePromise0
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10
  
  - promise.js:693 Promise._settlePromises
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:693:18
  
  - async.js:133 Async._drainQueue
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:133:16
  
  - async.js:143 Async._drainQueues
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:143:10
  
  - async.js:17 Immediate.Async.drainQueues
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14

Environment

Gatsby version:1.1.31
Node.js version: 8.9.4
Operating System:Ubuntu

@yadavshashank yadavshashank changed the title fatal: Could not read from remote repository. Error: Command failed: git clone git@github.com:gatsbyjs/gatsby-starter-default.git gatsby-site --single-branch fatal: Could not read from remote repository. Jan 26, 2018
@dhnaranjo
Copy link

dhnaranjo commented Jan 26, 2018

Having an identical issue.

Gatsby-CLI: 1.1.31
Node: 9.4.0
Operating System: Arch Linux

@jwright04
Copy link

Identical as well

Gatsby: 1.1.31
Node: 9.4.0
Operating System: MacOS El Capitan

@dhnaranjo
Copy link

dhnaranjo commented Jan 26, 2018

This appears to be caused by this here commit: 516653c

So I checked it out and was able to resolve my own issue by registering a public SSH key with my github account for the computer I was on. I confirmed that this was the case by:

  • Running git clone git@github.com:gatsbyjs/gatsby-starter-default.git gatsby and observing failure.
  • Adding this computers public SSH key to my GitHub account.
  • Running git clone git@github.com:gatsbyjs/gatsby-starter-default.git gatsby and observing succes.
  • Just for kicks, removing the SSH key from my GH account and observing failure once again.

So, that's the problem. I guess some possible solutions would be requiring all users of Gatsby-CLI to have a GitHub account with an SSH key registered on every computer they're using Gatsby-CLI on, which seems like a lot, or reverting to the previous means of grabbing the repo, which I'm sure was changed for some other valid reason that would need to be dealt with in another way.

But in the interim, if anyone is having this issue why not try: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

@jwright04
Copy link

I assumed it was something similar I was going down that exact path, thanks for the confirmation!

@yadavshashank
Copy link
Author

Worked like a charm, thanks.

@HighTide2020
Copy link

The same problem used SSH and worked!

@dhnaranjo
Copy link

@shashank1558 slow down my man, I really don't think it is like, desirable to require every single Gatsby user to have to register an ssh key with github in order to use the program, do you?

Like, just because this tool is hosted on github, should the use of it be tied to being a github user?

@yadavshashank yadavshashank reopened this Jan 28, 2018
@KyleAMathews
Copy link
Contributor

Hey sorry about this — I merged a PR a few days ago which broke things for people without a public key. This PR removed that requirement #3735

Upgrade to the latest gatsby-cli to get this.

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

5 participants