-
Notifications
You must be signed in to change notification settings - Fork 9
docs(deploy): by-reference deploys, sealed credentials, CI token auth (draft) #616
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -155,6 +155,7 @@ harper login <URL> | |||||||||
| **Optional Parameters**: | ||||||||||
|
|
||||||||||
| - `<URL>` - The URL of the Harper instance to log in to. | ||||||||||
| - `--for-ci` - Print CI/CD credentials to stdout after logging in. Available since v5.2.0. | ||||||||||
|
|
||||||||||
| **Prompts**: | ||||||||||
|
|
||||||||||
|
|
@@ -164,6 +165,20 @@ You'll be asked to type in the following information: | |||||||||
| - `<username>` - Harper admin username. | ||||||||||
| - `<password>` - Harper admin password. | ||||||||||
|
|
||||||||||
| **`--for-ci`**: | ||||||||||
|
|
||||||||||
| Prints `HARPER_CLI_TARGET` and `HARPER_CLI_REFRESH_TOKEN` to **stdout** in `.env` format — and nothing else, so the output pipes directly into a secret store without the token being displayed. Everything else (banner, prompts, status) goes to stderr: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| # Set both GitHub Actions secrets in one command | ||||||||||
| harper login --for-ci | gh secret set --env-file - | ||||||||||
|
Comment on lines
+173
to
+174
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Consider providing a standard shell loop or pointing to the correct syntax for setting individual secrets.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applying this one — The second command consumed stdin and got as far as the API call — it failed on the deliberately nonexistent repo, not on reading the file. A rejected Worth adding that the suggested loop would be a downgrade for this specific use: 🤖 Reviewed by Claude Code |
||||||||||
|
|
||||||||||
| # Or copy them to paste in by hand | ||||||||||
| harper login --for-ci | pbcopy | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| See [Token credentials for CI/CD](authentication.md#token-credentials-for-cicd) for how the CLI consumes these variables, and for why a pipeline should use a dedicated user. | ||||||||||
|
|
||||||||||
| ### `harper logout` | ||||||||||
|
|
||||||||||
| Available since: v5.0.0 | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
gh secret setcommand in the GitHub CLI does not support a--env-fileflag. To set multiple secrets from an environment file, you typically need to loop over the file's contents in your shell script or use a customghextension.Consider providing a standard shell loop or pointing to the correct syntax for setting individual secrets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not applying this one —
gh secret set --env-filedoes exist, and-for stdin works. Verified ongh version 2.92.0:The second command consumed stdin and got as far as the API call — it failed on the deliberately nonexistent repo, not on reading the file. A rejected
-would have failed earlier with a file error.Worth adding that the suggested loop would be a downgrade for this specific use:
gh secret set NAME -b "$VALUE"puts the token in the process's argument list, where it's visible topsfor the life of the call and may land in shell history. Keeping the token on stdin and never in argv is precisely why--for-ciwrites a dotenv block rather than printing a value to copy.🤖 Reviewed by Claude Code