-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Action Secrets remove the last new line #24721
Labels
Comments
lunny
pushed a commit
that referenced
this issue
May 16, 2023
Fix #24721. Follow what GitHub does: - Don't trim spaces for secrets. - Newline should be `\n` instead of `\r\n`. Did some tests with: ```yaml name: secrets on: push jobs: show_secrets: runs-on: ubuntu-latest steps: - name: Dump secrets context run: echo '${{ toJSON(secrets) }}' | base64 ``` `AAAAAA`: ```text AAAAAA AAAAAA ``` `BBBBBB`: ```text BBBBBB BBBBBB ``` On GitHub: <img width="675" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8"> On Gitea (before): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2"> On Gitea (after): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a">
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
May 16, 2023
Fix go-gitea#24721. Follow what GitHub does: - Don't trim spaces for secrets. - Newline should be `\n` instead of `\r\n`. Did some tests with: ```yaml name: secrets on: push jobs: show_secrets: runs-on: ubuntu-latest steps: - name: Dump secrets context run: echo '${{ toJSON(secrets) }}' | base64 ``` `AAAAAA`: ```text AAAAAA AAAAAA ``` `BBBBBB`: ```text BBBBBB BBBBBB ``` On GitHub: <img width="675" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8"> On Gitea (before): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2"> On Gitea (after): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a">
silverwind
pushed a commit
that referenced
this issue
May 16, 2023
Backport #24745 by @wolfogre Fix #24721. Follow what GitHub does: - Don't trim spaces for secrets. - Newline should be `\n` instead of `\r\n`. Did some tests with: ```yaml name: secrets on: push jobs: show_secrets: runs-on: ubuntu-latest steps: - name: Dump secrets context run: echo '${{ toJSON(secrets) }}' | base64 ``` `AAAAAA`: ```text AAAAAA AAAAAA ``` `BBBBBB`: ```text BBBBBB BBBBBB ``` On GitHub: <img width="675" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8"> On Gitea (before): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2"> On Gitea (after): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a"> Co-authored-by: Jason Song <i@wolfogre.com>
Codeberg-org
pushed a commit
to Codeberg-org/gitea
that referenced
this issue
Jun 3, 2023
…itea#24746) Backport go-gitea#24745 by @wolfogre Fix go-gitea#24721. Follow what GitHub does: - Don't trim spaces for secrets. - Newline should be `\n` instead of `\r\n`. Did some tests with: ```yaml name: secrets on: push jobs: show_secrets: runs-on: ubuntu-latest steps: - name: Dump secrets context run: echo '${{ toJSON(secrets) }}' | base64 ``` `AAAAAA`: ```text AAAAAA AAAAAA ``` `BBBBBB`: ```text BBBBBB BBBBBB ``` On GitHub: <img width="675" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8"> On Gitea (before): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2"> On Gitea (after): <img width="673" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a"> Co-authored-by: Jason Song <i@wolfogre.com> (cherry picked from commit e4f200e)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Hi there,
Im trying to SSH via basic commands to my SSH server.
SSH_USER
SSH_KEY
SSH_HOST
where SSH_KEY is the actual private key
And I'm using the following action.yaml
After some debugging it seems that the Secrets field is removing the last new line of the Private Key. In my case I can fix it by using
echo "${{ secrets.SSH_KEY }}" | tr -d '\r' > ~/.ssh/staging.key
instead.However, the secret field should not trim the content. It should respect the last new line of the file.
Gitea Version
1.19.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
Gitea is running in a docker container.
Database
SQLite
The text was updated successfully, but these errors were encountered: