The armhf build in CI uses Snapcraft remote-build with Launchpad.
Since GitHub runners do not have a Launchpad identity, authentication credentials must be generated locally and stored as a GitHub repository secret.
Follow the steps below to generate and configure the credentials.
The credentials are generated via an interactive Snapcraft OAuth login. First navigate to the project directory:
cd path/to/cups-snap
Run the following command:
snapcraft remote-buildSnapcraft will display a Launchpad authorization URL.
- Copy the URL shown in the terminal.
- Open it in your browser.
- Click Authorize.
- Return to the terminal.
- Once the upload starts, stop the process using:
Ctrl + C
Stopping the process here is expected. The credentials will already have been generated.
Snapcraft stores the generated credentials locally. Run:
cat ~/.local/share/snapcraft/provider/launchpad/credentials
If the file is not present, check:
cat ~/.local/share/snapcraft/launchpad-credentials
You will see output similar to:
[1]
consumer_key = System-wide: Ubuntu (...)
consumer_secret =
access_token = <alphanumeric-string>
access_secret = <alphanumeric-string>
Copy the entire block, including [1].
The credentials must be added as a repository secret. Navigate to:
Repository → Settings → Secrets and variables → Actions
Create a new secret:
LP_CREDENTIALS
Value: Paste the complete credential block copied in the previous step.
Example:
[1]
consumer_key = System-wide: Ubuntu (...)
consumer_secret =
access_token = XXXXX
access_secret = XXXXX
These credentials will then be used automatically by the CI workflow when performing the armhf remote build.
Launchpad OAuth credentials generated by Snapcraft expire after approximately one year. If the CI workflow begins failing with authentication or authorization errors, new credentials must be generated by repeating the steps above and updating the LP_CREDENTIALS repository secret.