Reuse credentials
See original GitHub issueI’m currently using v2 of this action to clone a repo. In the workflow, some assets are generated, and I want to upload them to a branch (either in the same repo or in a different repo). I am using release.sh to copy sources to a new directory, create a new git repo there, create an orphan branch (gh-pages
) and push it. Currently, I need to set the origin as https://github.com/buildthedocs/sphinx.theme/blob/e1a0dbe8ba6843322194607aad45195d38f5ce5d/.github/workflows/doc.yml#L17. I saw that this action creates the following configuration:
remote.origin.url=https://github.com/buildthedocs/sphinx.theme
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
http.https://github.com/.extraheader=AUTHORIZATION: basic ***
Unfortunately, I could not reuse http
to configure the new clean/orphan repo that is created in the workflow. I’d like to know which is the recommended approach to replace https://github.com/buildthedocs/sphinx.theme/blob/e1a0dbe8ba6843322194607aad45195d38f5ce5d/.github/workflows/doc.yml#L17 and https://github.com/buildthedocs/sphinx.theme/blob/master/release.sh#L12-L13 with the credentials created by this action.
/cc @ericsciple
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
That’s what i would recommend as a best practice. It’s best to keep credentials off the command line.
Note,
cat
wouldn’t matter because the command line would just becat the-file-name
(captured by audit event) and the sensitive data would flow through the stdout stream (not captured).Thanks! In the end, just copying the config file worked (https://github.com/buildthedocs/sphinx.theme/commit/c3ed1178e6e849f6055f688fc29e3201cd4aa5e5) because it is the same repo after all.