Trying to run ghost docs locally

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

I’m trying to run docs.ghost.org locally and ran into two issues:

#Issue 1:
While running git submodule update --init, I ran into this issue. Not sure what it is.

Please make sure you have the correct access rights and the repository exists.

fatal: clone of 'git@github.com:TryGhost/docs-api.git' into submodule path '/Users/svikashk/Downloads/docs/content/api/v2' failed

Failed to clone 'content/api/v2' a second time, aborting

Cloning into '/Users/svikashk/Downloads/docs/content/api/v0.11'...

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

#Issue 2:
Even after running yarn and then copy and pasting .env.example to .env.development, I get

Error: GHOST_API_URL and GHOST_API_KEY are required to build. Check the CONTRIBUTING guide.

- gatsby-config.js:16 Object.<anonymous>
 /Users/svikashk/Downloads/docs/gatsby-config.js:16:11

- v8-compile-cache.js:178 Module._compile
[docs]/[v8-compile-cache]/v8-compile-cache.js:178:30

- loader.js:700 Object.Module._extensions..js
internal/modules/cjs/loader.js:700:10

- loader.js:599 Module.load
internal/modules/cjs/loader.js:599:32

- loader.js:538 tryModuleLoad
internal/modules/cjs/loader.js:538:12

- loader.js:530 Function.Module._load
internal/modules/cjs/loader.js:530:3

- loader.js:637 Module.require
internal/modules/cjs/loader.js:637:17

- v8-compile-cache.js:159 require
[docs]/[v8-compile-cache]/v8-compile-cache.js:159:20

- get-config-file.js:33 
[docs]/[gatsby]/dist/bootstrap/get-config-file.js:33:22

- Generator.next

- new Promise

- get-config-file.js:53 getConfigFile
[docs]/[gatsby]/dist/bootstrap/get-config-file.js:53:27

I’m not sure if #Issue 2 is because of #Issue 1. I git cloned from source today. Any pointers on what I might be getting wrong?

Looks like the parent repository is trying to set up the submodule using SSH, but you haven’t set up SSH with Github yet. I think if you follow these guides you should be all set:

Check for existing SSH keys
https://help.github.com/en/enterprise/2.15/user/articles/checking-for-existing-ssh-keys

Generate a new one, if you don’t already have one
https://help.github.com/en/enterprise/2.15/user/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

Add your key to your Github account
https://help.github.com/en/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account

Awesome! Works like a charm now. Thanks @John. :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.