We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e5a6bf commit 1cb33f3Copy full SHA for 1cb33f3
so-create-repo.sh
@@ -175,8 +175,13 @@ setup_user_profile()
175
# get key ID
176
id=$(echo $res | jq -r '.id')
177
if [ "$id" == "null" ]; then
178
- echo -e "error: Adding SSH public key failed ... exiting\n"
179
- exit 1
+ message=$(echo $res | jq -r '.message | .fingerprint | .[0]')
+ if [ "$message" == "has already been taken" ]; then
180
+ echo -e "Your SSH public key is already added to GitLab!\n"
181
+ else
182
+ echo -e "error: Adding SSH public key failed ... exiting\n"
183
+ exit 1
184
+ fi
185
else
186
echo -e "Your SSH public key was successfully added to GitLab!\n"
187
fi
0 commit comments