Deployed Pages Remain after Repo or User is Deleted #2396

Open
opened 2026-02-21 06:22:53 +01:00 by veganmosfet · 5 comments

Comment

When using the Codeberg Pages (New Method), the pages at xxx.codeberg.page remain published and available even after the pages repo is deleted - and even after the codeberg user is deleted (> 12 hours).
Is it possible to delete them within a short time (1 hour) after deletion of repo and / or user?

### Comment When using the Codeberg Pages (New Method), the pages at xxx.codeberg.page remain published and available even after the *pages* repo is deleted - and even after the *codeberg user* is deleted (> 12 hours). Is it possible to delete them within a short time (1 hour) after deletion of repo and / or user?

I have a similar issue, which is that I published Pages to multiple codeberg.page domains while I was debugging stuff. Now I have my Pages being served correctly, but old versions still laying around. I’d like to delete them like I did with grebedoc.dev using git-pages-cli but I can’t seem to figure out which “site”, “server”, “token” and “password” to use… here is what I’ve tried so far:

git-pages-cli https://<username>.codeberg.page --password "${CODEBERG_TOKEN:?}" --delete
result: error
unauthorized
- failed to look up DNS challenge: _git-pages-challenge.<username>.codeberg.page TXT
# This was a mistake, of course it wasn’t going to work

git-pages-cli https://<username>.codeberg.page --token "${CODEBERG_TOKEN:?}" --delete
result: error
unauthorized
- missing Authorization header

git-pages-cli https://codeberg.page/<username> --token "${CODEBERG_TOKEN:?}" --delete
result: error
Method not allowed

git-pages-cli https://<username>.codeberg.page --server codeberg.page --token "${CODEBERG_TOKEN:?}" --delete
result: error
Method not allowed

git-pages-cli https://<username>.codeberg.page --server codeberg.org --token "${CODEBERG_TOKEN:?}" --delete
result:
# Page still online

git-pages-cli http://<username>.codeberg.page --server codeberg.org --token "${CODEBERG_TOKEN:?}" --delete
result:
<!doctype html>…
# Why do I get the page when deleting?

git-pages-cli http://<username>.codeberg.page --server codeberg.page --token "${CODEBERG_TOKEN:?}" --delete
result:
<!doctype html>…
# Same thing on codeberg.page

git-pages-cli http://codeberg.page/<username> --server codeberg.org --token "${CODEBERG_TOKEN:?}" --delete
result: error
<!doctype html>
<html class="codeberg-design">…
# At this point I’m just messing around

# In a Forgejo Actions workflow:
git-pages-cli http://<username>.codeberg.page --server codeberg.org --token '${{ forge.token }}' --delete
result:
# Page still online
I have a similar issue, which is that I published Pages to multiple `codeberg.page` domains while I was debugging stuff. Now I have my Pages being served correctly, but old versions still laying around. I’d like to delete them like I did with `grebedoc.dev` using `git-pages-cli` but I can’t seem to figure out which “site”, “server”, “token” and “password” to use… here is what I’ve tried so far: ```bash git-pages-cli https://<username>.codeberg.page --password "${CODEBERG_TOKEN:?}" --delete result: error unauthorized - failed to look up DNS challenge: _git-pages-challenge.<username>.codeberg.page TXT # This was a mistake, of course it wasn’t going to work git-pages-cli https://<username>.codeberg.page --token "${CODEBERG_TOKEN:?}" --delete result: error unauthorized - missing Authorization header git-pages-cli https://codeberg.page/<username> --token "${CODEBERG_TOKEN:?}" --delete result: error Method not allowed git-pages-cli https://<username>.codeberg.page --server codeberg.page --token "${CODEBERG_TOKEN:?}" --delete result: error Method not allowed git-pages-cli https://<username>.codeberg.page --server codeberg.org --token "${CODEBERG_TOKEN:?}" --delete result: # Page still online git-pages-cli http://<username>.codeberg.page --server codeberg.org --token "${CODEBERG_TOKEN:?}" --delete result: <!doctype html>… # Why do I get the page when deleting? git-pages-cli http://<username>.codeberg.page --server codeberg.page --token "${CODEBERG_TOKEN:?}" --delete result: <!doctype html>… # Same thing on codeberg.page git-pages-cli http://codeberg.page/<username> --server codeberg.org --token "${CODEBERG_TOKEN:?}" --delete result: error <!doctype html> <html class="codeberg-design">… # At this point I’m just messing around # In a Forgejo Actions workflow: git-pages-cli http://<username>.codeberg.page --server codeberg.org --token '${{ forge.token }}' --delete result: # Page still online ```
Member

I have a similar issue, which is that I published Pages to multiple codeberg.page domains while I was debugging stuff. Now I have my Pages being served correctly, but old versions still laying around. I’d like to delete them like I did with grebedoc.dev using git-pages-cli but I can’t seem to figure out which “site”, “server”, “token” and “password” to use… here is what I’ve tried so far:

You should be able to create a token for your user (make sure it has at least "repository: read and write" level of permission) then use git-pages-cli with the --token ... --delete options to remove it. Let me know if that fails.

> I have a similar issue, which is that I published Pages to multiple codeberg.page domains while I was debugging stuff. Now I have my Pages being served correctly, but old versions still laying around. I’d like to delete them like I did with grebedoc.dev using git-pages-cli but I can’t seem to figure out which “site”, “server”, “token” and “password” to use… here is what I’ve tried so far: You should be able to [create a token for your user](https://codeberg.org/user/settings/applications) (make sure it has at least "repository: read and write" level of permission) then use git-pages-cli with the `--token ... --delete` options to remove it. Let me know if that fails.
Member

Regarding the unexpected HTML responses, I filed git-pages/git-pages-cli#23 to track that.

Regarding the unexpected HTML responses, I filed https://codeberg.org/git-pages/git-pages-cli/issues/23 to track that.

You should be able to create a token for your user (make sure it has at least "repository: read and write" level of permission) then use git-pages-cli with the --token ... --delete options to remove it. Let me know if that fails.

@whitequark Thank you for your interest! Unfortunately that’s what the examples with --token "${CODEBERG_TOKEN:?}" used 😕 Did I miss the correct flag/arg combination?

> You should be able to [create a token for your user](https://codeberg.org/user/settings/applications) (make sure it has at least "repository: read and write" level of permission) then use git-pages-cli with the `--token ... --delete` options to remove it. Let me know if that fails. @whitequark Thank you for your interest! Unfortunately that’s what the examples with `--token "${CODEBERG_TOKEN:?}"` used 😕 Did I miss the correct flag/arg combination?
Member

@RemiBardon Oh, right, we never implemented Forge-Authorization for DELETE requests. I'll make sure we do.

@RemiBardon Oh, right, we never implemented Forge-Authorization for `DELETE` requests. I'll make sure we do.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#2396
No description provided.