Skip to content

Use working upload key until org secret fixed - #115

Merged
Jaifroid merged 2 commits into
mainfrom
Use-working-upload-key-until-org-secret-fixed
Aug 6, 2026
Merged

Use working upload key until org secret fixed#115
Jaifroid merged 2 commits into
mainfrom
Use-working-upload-key-until-org-secret-fixed

Conversation

@Jaifroid

@Jaifroid Jaifroid commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

The org secret for upload to OpenZim releases errors out, whereas the repo-level secret works fine. So I have to revert #112 and re-open #101 temporarily.

Jaifroid and others added 2 commits August 6, 2026 14:54
The upload loop printed "Uploaded <file>..." unconditionally, without
checking scp's exit code. In run 31105640103 every file failed to transfer
with "Permission denied (publickey)" and the log still claimed success for
both; the step only went red because the last scp's exit code happened to
leak out of the script. Had the first file failed and the second succeeded,
the run would have been green with a file missing from the server.

scp's exit code is now checked per file, and the script exits 1 if any
transfer failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The org-level KIWIX_FILE_UPLOAD_SSH_KEY, as currently stored, cannot be
parsed by OpenSSH. Both upload workflows therefore point back at the
repo-level copy, which authenticates and uploads successfully.

Evidence from two runs of the same job on the same runner (OpenSSH_10.3p1,
OpenSSL 3.5.7), differing only in which secret was used:

  org  31107600716: 400 bytes, 7 lines, crlf=1, bom=False
                    ssh-keygen -y -> error in libcrypto: unsupported (255)
                    scp -> Permission denied (publickey), nothing uploaded
  repo 31107727173: 401 bytes, 8 lines, crlf=1, bom=False
                    ssh-keygen -y -> loaded (0)
                    scp -> both assets uploaded

Identical write path and no BOM in either, so the workflow is not at fault.
The org copy is one byte and one line shorter than a working copy of the
same key, which points at a line break lost when the secret was stored. The
libcrypto error rather than "invalid format" suggests the missing newline is
the one after the BEGIN armour line: OpenSSH then fails to recognise its own
format and falls back to OpenSSL, which rejects it.

This reverts the workflow half of #101 only. The key file path fix and the
.gitignore entry from that change are unaffected and stay.

Note that the nightly workflow was migrated too, so without this it would
have started failing at its next scheduled run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Jaifroid Jaifroid self-assigned this Aug 6, 2026
@Jaifroid Jaifroid added help wanted Extra attention is needed build Code relating to building or publishing assets task labels Aug 6, 2026
@Jaifroid
Jaifroid merged commit 6013a89 into main Aug 6, 2026
2 checks passed
@Jaifroid
Jaifroid deleted the Use-working-upload-key-until-org-secret-fixed branch August 6, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Code relating to building or publishing assets help wanted Extra attention is needed task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant