-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
I'm running this action on Gitea, and today I have discovered Gitea saves secrets with cr/lf Windows style endings, which makes git clone fail, even though I run Gitea via Docker, and none of my computers have Windows:
Load key "/root/.ssh/id_rsa": invalid format
git@git.example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
I had to add this extra step to fix the issue:
- name: Fix SSH key
run: sed -i 's/\r$//g' /root/.ssh/id_rsaI do realize this issue is on Gitea side, which I will report, but would appreciate if you could implement same functionality but within this action and add one extra config option, for such scenarios. Like:
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2.5.1
with:
key: ${{ secrets.SSH_KEY }}
key_strip_cr: true
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
config: |
Host git.example.com
Port 12345
User gitThanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels