Closed grsterin closed 3 years ago
2.9.0
Set Git Identity step fails when there is no Git identity configured:
Set Git Identity
#!/bin/bash -eo pipefail USER_EMAIL=$(git config --get user.email) USER_NAME=$(git config --get user.name) if [ "$USER_EMAIL" = "" ]; then git config user.email "circleci@example.com" fi if [ "$USER_NAME" = "" ]; then git config user.name "CircleCI" fi Exited with code exit status 1 CircleCI received exit code 1
The reason is that git config --get user.email returns non-zero return code. Example from SSH debug session:
git config --get user.email
circleci:~/project$ git config --get user.email circleci:~/project$ echo $? 1
Should successfully set default Git identity when there's no current identity configured at all.
FWIW my team is seeing the same issue. ccing a few folks who might have worked on this: @gmemstr @iynere
Thanks!
Orb version
2.9.0
What happened
Set Git Identity
step fails when there is no Git identity configured:The reason is that
git config --get user.email
returns non-zero return code. Example from SSH debug session:Expected behavior
Should successfully set default Git identity when there's no current identity configured at all.