# Problems deploying to github

**URL:** <https://discourse.gohugo.io/t/problems-deploying-to-github/20646>\
**Category:** support\
**Created:** [September 7, 2019, 4:48pm UTC](https://discourse.gohugo.io/t/problems-deploying-to-github/20646 "2019-09-07T16:48:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![canstream](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/canstream/32/9527_2.png) [@canstream](https://discourse.gohugo.io/u/canstream)\
**Post date:** [September 7, 2019, 4:48pm UTC](https://discourse.gohugo.io/t/problems-deploying-to-github/20646/1 "2019-09-07T16:48:10Z")

</div>

Hi

I’m trying deploy my Hugo site using the instructions here:

[https://gohugo.io/hosting-and-deployment/hosting-on-github/#step-by-step-instructions](https://gohugo.io/hosting-and-deployment/hosting-on-github/#step-by-step-instructions)

I developed the site on one PC and uploaded the files to github so that I could pull them down on another PC and continue working on them. Now I wish to publish the site.

I have tried to issue the following command:

`git submodule add -b master git@github.com:<USERNAME>/<USERNAME>.github.io.git public`

By substituting my relevant info:

`git submodule add -b master git@github.com:canstream/canstream.github.io.git public`

But I get the following error:

> `Cloning into '/home/user/mysite/2019-conference/public'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.`

> `Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:canstream/canstream.github.io.git' into submodule path '/home/user/mysite/2019-conference/public' failed`

For information, I have no ‘_public_’ folder - when I ran `hugo` it created a sub-directory as follows: `canstream.github.io` which contains files (html, css, js etc) for the website.

My directory structure looks a little like this:

`$pwd`  
`/home/user/mysite/2019-conference`

`$ls .`

`archetypes canstream.github.io CNAME config.toml config.toml.ORIGINAL content README.md resources themes`

Should I run the following command:

`git submodule add -b master git@github.com:canstream/canstream.github.io.git canstream.github.io`

Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![DazWilkin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dazwilkin/32/9526_2.png) [@DazWilkin](https://discourse.gohugo.io/u/DazWilkin)\
**Post date:** [September 7, 2019, 8:57pm UTC](https://discourse.gohugo.io/t/problems-deploying-to-github/20646/2 "2019-09-07T20:57:05Z")

</div>

It appears that:

- your GitHub repo is private
- you have not configured your machine with a GitHub access token so that it may clone the repo.

Because `canstream.github.io` must be public to be available as GitHub pages, you should make this change on GitHub and you should then also be able to clone the repo without issue.

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [September 7, 2019, 10:27pm UTC](https://discourse.gohugo.io/t/problems-deploying-to-github/20646/3 "2019-09-07T22:27:50Z")

</div>


