Closed FarisZR closed 2 years ago
you can also use github discussions
my question was:
how to add an ssh key from a secret ? it doesn't work like drone:
pipeline:
push:
image: alpine:latest
commands:
- apk add --no-cache openssh
- eval `ssh-agent -s`
- echo "${ssh_priv12_key}" | ssh-add -
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- git config --global user.name "org-Bot"
- git config --global user.email "$${BOT_EMAIL}"
- git remote set-url origin ssh://git@codeberg.org/xxx/xxx
- git checkout pages
- git add dev
- git commit -m "upload latest dev build"
secrets: [bot_email, ssh_priv12_key]
it stops at the 3rd command Error loading key "(stdin)": invalid format
We already have a matrix space: https://matrix.to/#/#WoodpeckerCI:obermui.de
For your problem you could try
echo "$${ssh_priv12_key}" | ssh-add
or
echo "$${ssh_priv12_key}" | ssh-add
${...}
is a syntax which is currently replaced by our string subsitution engine (super bad dx if you ask me) https://woodpecker-ci.org/docs/usage/environment#string-substitution
We used something similar for the woodpecker docs: https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docs.yml
the solution didn't work for me. but i think we could continue in matrix.
i would like to see mentioned more clearly that there is a matrix room in the github issues. like a button for matrix and another for discord for example.
currently when clicking on questions and support it redirects you to discord.
i created a temp account, but it required my phone number, for just creating an empty account. i suggest creating a matrix room like codeberg with a bridge to discord.
so we users don't have to deal with discord bad privacy.