-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Description
I'm trying to launch a kubernetes Cluster with ubuntu. I saw the docs must be updated #8373. During the process the verify-ssh-prereqs in utils.sh in ubuntu folder failed :
Could not find or add an SSH identity.
Please start ssh-agent, add your identity, and retry.
I changed the function by :
local rc
rc=0
ssh-add -L 1> /dev/null 2> /dev/null || rc="$?"
# "Could not open a connection to your authentication agent."
if [[ "${rc}" -eq 2 ]]; then
eval "$(ssh-agent)" > /dev/null
fi
rc=0
ssh-add -L 1> /dev/null 2> /dev/null || rc="$?"
# "The agent has no identities."
if [[ "${rc}" -eq 1 ]]; then
# Try adding one of the default identities, with or without passphrase.
ssh-add || true
fi
# Expect at least one identity to be available.
if ! ssh-add -L 1> /dev/null 2> /dev/null; then
echo "Could not find or add an SSH identity."
echo "Please start ssh-agent, add your identity, and retry."
exit 1
fi
a lot inspired by the vsphere utils.sh and now it works.
I think eval "$(ssh-agent)" > /dev/null
must be added somewhere before ssh-add
Metadata
Metadata
Assignees
Labels
priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.