I am using docusaurus to write a documentation website for a product. I made some customizations to the site and try to publish it on GitHub.
Following the tutorial, I config the website/siteConfig.js
, ran npm run build
and used :
$ GIT_USER=<GIT_USER> CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages
to push it to Github. Cloning to gh-pages fails and shows "fatal: Could not read from remote repository." error.
The following git commands were what I used.
LM-SHC-16507799:website benshi$ ls
README.md core node_modules sidebars.json yarn.lock
blog git package.json siteConfig.js
build i18n pages static
LM-SHC-16507799:website benshi$ pwd
/Users/user_name/Desktop/calender/week_3/docusaurus-exp/website
LM-SHC-16507799:website user_name$ GIT_USER=my_github_user_name CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages
It failed. The following error messages were shown.
> @ publish-gh-pages /Users/user_name/Desktop/calender/week_3/docusaurus-exp/website
> docusaurus-publish
master
https://github.com/my_github_user_name/docusaurus-exp.git
generate.js triggered...
feed.js triggered...
feed.js triggered...
sitemap.js triggered...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
Site built successfully. Generated files in 'build' folder.
89b1f1bd2f7e2403a08a194a89379916edcbb540
Cloning into 'docusaurus-exp-gh-pages'...
ssh_exchange_identification: read: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Error: git clone failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ publish-gh-pages: `docusaurus-publish`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ publish-gh-pages script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user_name/.npm/_logs/2019-07-18T07_15_37_998Z-debug.log