Closed gvasquez95 closed 3 months ago
I just found installation log files and the latest one shows this message just before entering the loop:
Should this be used for git defender? (y/N) Configure email allowed for commits
Existing email: user@mydomain.com
Should this be used for git defender? (y/N)
As N
is the default option, that seems to be the issue. I'll try to install from a blank Cloud9 environment, instead of my local machine. Could this default be overriden, perhaps?
Hi @gvasquez95 Thanks for reaching out! Can you please comment out lines 56-63 from this file and try again? https://github.com/awslabs/app-development-for-backstage-io-on-aws/blob/8b1907352286fea7a617b76cb49c3aa3fe89847c/build-script/gitlab-tools.sh#L58
This issues should only apply to users that have git-defender installed. A manual change you could make to workaround the git-defender "looping" behavior: In the gitlab-tools.sh file at line 56 (link), you can replace lines 56-63 with the following code:
IS_DEFENDER=$(type "git-defender" 2>/dev/null) || true
# if the system is using git-defender and the repo is not configured, configure it
if [[ ! -z "$IS_DEFENDER" ]] && ! grep -q "\[defender\]" .git/config ; then
echo -e "\nGit Defender detected. Populating git-temp/backstage-reference/.git/config for Defender.\n"
echo -e "" >> .git/config
echo -e "[defender]" >> .git/config
echo -e "\tallowrepo = https://$SSM_GITLAB_HOSTNAME/opa-admin/backstage-reference.git" >> .git/config
echo -e "\tallowemail = $(whoami)@amazon.com" >> .git/config
echo -e "\tregistered = true" >> .git/config
echo -e "" >> .git/config
elif grep -q "\[defender\]" .git/config ; then
echo -e "Git Defender has already been configured in git-temp/.git/config\n"
fi
A fix is being prepared to included in the next release
@awsjim the workaround worked perfectly, thanks
Description
Configuration phase during installation fails, getting trapped in an endless loop about invalid/missing email. Valid/existing email address has been provided in line 73 of
config/.env
file under environment variableBACKSTAGE_SCAFFOLDER_EMAIL
Environment:
Extra:
Cloudformation
opa-platform
Stack gets created with CREATE_COMPLETE Status[x] ✋ I have searched the open/closed issues and my issue is not listed.
Versions
yarn list --cwd backstage --pattern aws-apps
Reproduction Code [Required]
make install
Steps to reproduce the behavior:
Expected behavior
Installation succeeded
Actual behavior
Trapped in loop
Terminal Output Screenshot(s)
Endless loop of:
email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository email: Email cannot be blank and must be a valid email Please enter the email you'd like to use for this repository
Additional context