Problems deploying to github


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

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<USERNAME>/<USERNAME> public

By substituting my relevant info:

git submodule add -b master public

But I get the following error:

Cloning into '/home/user/mysite/2019-conference/public'... 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 '' 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: which contains files (html, css, js etc) for the website.

My directory structure looks a little like this:


$ls .

archetypes CNAME config.toml config.toml.ORIGINAL content resources themes

Should I run the following command:

git submodule add -b master

Many thanks in advance.

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 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.

1 Like