JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
811 stars 479 forks source link

Deployment failure #2581

Closed andreasvarga closed 3 hours ago

andreasvarga commented 4 hours ago

This is a recurring problem for me, which I encouter almost every time I start developing a new package. This time my strugle is with PeriodicMatrices.

Although, I think I performed all settings according to Documenter's requirements (i.e., creating authentication SSH Deploy Keys, preparing a workflow configuration file called .github/workflows/documentation.yml with identical contents as in documentation, adding the public SSH key to my settings page for the GitHub repository, entering the name documenter as the title, and copying the public key into the Key field, allowing write access to Documenter to commit the generated documentation to the repo). The last failure can be seen here.

I have no idea what to do. Any hint could be helpful for me. Thanks in advance.

goerz commented 3 hours ago

The relevant error still seems to be

┌ Error: Git failed to fetch git@github.com:andreasvarga/PeriodicMatrices.jl.git
│ This can be caused by a DOCUMENTER_KEY variable that is not correctly set up.
│ Make sure that the environment variable is properly set up as a Base64-encoded string
│ of the SSH private key. You may need to re-generate the keys with DocumenterTools.
└ @ Documenter ~/.julia/packages/Documenter/C1XEF/src/deploydocs.jl:380

So, some kind of misconfiguration of deploy keys, would be my guess.

entering the name documenter as the title

I can't access your repo secrets, but I don't think there's anything that should be named documenter anywhere.

Things should work if you follow the instructions at https://documenter.juliadocs.org/stable/man/hosting/. Note that anything in there about "Travis CI" basically also applies to GitHub Actions. Travis used to be the go-to CI for open source until it collapsed and was replaced by GitHub Actions, but the Documenter documentation hasn't been fully updated.

You might also find https://www.youtube.com/watch?v=bEAb7nDxuDE useful, which is pretty up-to-date

I'm going to close the issue, since it's not really something that's actionable on the Documenter side (besides "improve the documentation", which is already on our radar), but feel free to add more comments if you need more help. In general, Discourse is probably a better place to get help with these kinds of issues.

andreasvarga commented 3 minutes ago

So, some kind of misconfiguration of deploy keys, would be my guess.

entering the name documenter as the title

I can't access your repo secrets, but I don't think there's anything that should be named documenter anywhere.

I mentioned this, being a request formulated in the documentation (section Authentication: SSH Deploy Keys):

"Follow the instructions that are printed out, namely:

1. Add the public ssh key to your settings page for the GitHub repository that you are setting up by following the .../settings/keys link provided. Click on Add deploy key, enter the name **documenter** as the title, and copy the public key into the **Key** field. Check **Allow write access** to allow Documenter to commit the generated documentation to the repo.

2. Next add the long private key to the Travis settings page using the provided link. Again note that you should include no whitespace when copying the key. In the Environment Variables section add a key with the name DOCUMENTER_KEY and the value that was printed out. Do not set the variable to be displayed in the build log. Then click Add. "

I am using the same settings for other 5 packages and everything works as expected. So, I wonder if is a way to debug such failures ? As you understand, for me this could not be a closed issue!