Skip to content
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

Draft: Fix gitlab sshkey error #806

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions gitlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ if [ -n "$SSH_PRIVATE_KEY" ]; then
# start SSH agent
# shellcheck disable=SC2046
eval $(ssh-agent -s)
# Adding new line at the end of ssh key to avoid https://github.com/ros-industrial/industrial_ci/issues/756
PRKEY_EXTENDED="${SSH_PRIVATE_KEY}\n"
echo -e "DEBUG: ssh key: ${SSH_PRIVATE_KEY}"
# add key to agent
ssh-add <(echo "$SSH_PRIVATE_KEY") || { res=$?; echo "could not add ssh key"; exit $res; }

# Temporarilly disabling to see if this lets ICI work around failure https://github.com/ros-industrial/industrial_ci/issues/756
# echo -n "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - || { res=$?; echo "could not add ssh key"; exit $res; }
if [ -n "$SSH_SERVER_HOSTKEYS" ]; then
mkdir -p ~/.ssh
# setup known hosts
Expand Down