Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to exclude forbidden files (sitemap.xml.gz) #174

Closed
Siroccomeister opened this issue Sep 26, 2023 · 3 comments
Closed

how to exclude forbidden files (sitemap.xml.gz) #174

Siroccomeister opened this issue Sep 26, 2023 · 3 comments

Comments

@Siroccomeister
Copy link

Hello - am trying to run mike versioning on Material for MkDocs.
It is on a private Gitlab and one of the server rules is to prevent any compressed file to be upload (.gz).
But mike deploy seems to systematically create the sitemap.xml.gz file within gh-pages branch.
And when I try to push it - it creates an error.

remote: Resolving deltas: 100% (64/64), done.
remote: ERROR: 0.1/sitemap.xml.gz filetype is forbidden
remote: error: hook declined to update refs/heads/gh-pages
! [remote rejected] gh-pages -> gh-pages (hook declined)

Listing explicitly this file in .gitignore or /info/exclude does not fix this.
If I remove the file from the repo/site/ folder, it still remains in the gh-pages branch prior to the git push.

Any idea how to work around this? I know that mike is primarily tasked to work on GitHub.
But it would be useful to get the above resolved

Thanks !

@jimporter
Copy link
Owner

jimporter commented Sep 26, 2023

Have you tried this with MkDocs (e.g. mkdocs gh-deploy), and without mike? I think this is a bug in MkDocs itself, since it's responsible for generating sitemap.xml.gz.

Of course, it wouldn't be hard for you to work around if you wanted something right away: just amend the commit that mike (or equivalently, MkDocs) made and remove the offending file. It's just an ordinary Git commit, so all the usual Git subcommands should work fine.

@Siroccomeister
Copy link
Author

Siroccomeister commented Sep 29, 2023 via email

@jimporter
Copy link
Owner

Sorry, I can't really help much further than this, since I'm not very familiar with how Gitlab expects users to deploy pages (though I know it's different from Github). Issue #25 has some tips/ideas for how to do this that you could try though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants