Fatal: 'upstream/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it

documenter

#1

Hi,

In a new, still unregistered, package I am running into above error when trying to publish documentation. This is, amongst other things, an exercise using Literate.jl.

I tried it a couple of times, including deleting the existing gh-pages branches a few times (like in below trace). I’ve used the Documenter v0.20 in a couple of other packages without problems, but in those cases existing gh-pages branches existed. I did also refresh the deploy key and DOCUMENTER_KEY a few times.

Has anyone come across this issue?

Thanks,
Rob

-------details----------

Documenter: building cross-references.
Documenter: running document checks.

checking for missing docstrings.
running doctests.
checking footnote links.
Documenter: populating indices.
Documenter: rendering document.
?? TRAVIS_REPO_SLUG = “StanJulia/StatisticalRethinking.jl”
?? should occur in “github.com/StanJulia/StatisticalRethinking.jl.git” (kwarg: repo)
?? TRAVIS_PULL_REQUEST = “false”
?? deploying if equal to “false”
?? TRAVIS_BRANCH = “master”
?? TRAVIS_TAG = “”
?? deploying if branch equal to “master” (kwarg: devbranch) or tag is set
?? git commit SHA = e44f989
?? DOCUMENTER_KEY exists = [secure]
?? should_deploy = [secure]
Documenter: setting up target directory.
Documenter: pushing new documentation to remote: github.com/StanJulia/StatisticalRethinking.jl.git:gh-pages.
Initialized empty Git repository in /tmp/tmprlCD6q/.git/
Warning: Permanently added the RSA host key for IP address ‘192.30.253.113’ to the list of known hosts.
From github.com:StanJulia/StatisticalRethinking.jl

  • [new branch] master -> upstream/master
    fatal: ‘upstream/gh-pages’ is not a commit and a branch ‘gh-pages’ cannot be created from it
    Documenter: Checking out gh-pages failed with error: ErrorException(“failed process: Process(git checkout -b gh-pages upstream/gh-pages, ProcessExited(128)) [128]”)
    Documenter: Creating a new local gh-pages branch.
    Switched to a new branch ‘gh-pages’
    [gh-pages (root-commit) 883fc15] Initial empty commit for docs
    ┌ Warning: creating symlink from latest to dev for backwards compatibility with old links. In future Documenter versions this symlink will not be created. Please update any links that point to latest.
    └ @ Documenter ~/.julia/packages/Documenter/e77Rr/src/Documenter.jl:544
    [gh-pages 2f697f1] build based on e44f989
    19 files changed, 31822 insertions(+)
    create mode 100644 dev/assets/arrow.svg
    create mode 100644 dev/assets/documenter.css
    create mode 100644 dev/assets/documenter.js
    create mode 100644 dev/assets/search.js
    create mode 100644 dev/index.html
    create mode 100644 dev/s2_4.pdf
    create mode 100644 dev/s2_5.pdf
    create mode 100644 dev/s2_6.pdf
    create mode 100644 dev/s2_7.pdf
    create mode 100644 dev/s3_1.pdf
    create mode 100644 dev/search/index.html
    create mode 100644 dev/search_index.js
    create mode 100644 dev/siteinfo.js
    create mode 100644 dev/snippets00/index.html
    create mode 100644 dev/snippets02/index.html
    create mode 100644 dev/snippets03/index.html
    create mode 100644 dev/snippets04/index.html
    create mode 120000 latest
    create mode 100644 versions.js
    remote:
    remote: Create a pull request for ‘gh-pages’ on GitHub by visiting:
    remote: https://github.com/StanJulia/StatisticalRethinking.jl/pull/new/gh-pages
    remote:
    The command “julia --project=docs --color=yes docs/make.jl” exited with 0.

#2

Solved: Needed to switch the settings to build from gh-pages instead of from doc/…