cloudcomponents/cdk-constructs

FullRegionS3CodeCommitBackup failes when repositories_names are specified

Closed this issue · 0 comments

When explicity specifying the names of the repositories you want to backup, all the entries in the array are merged into one string.

This string is then used as codecommit repo name:

repository_names = ["repo_name_one", "repo_name_two"]

Running command ./backup_codecommit.sh
--
declare -a repos '[' -z repo_name_one repo_name_two ']'
./backup_codecommit.sh: line 7: [: repo_name_one: binary operator expected repos='repo_name_one repo_name_two' for codecommitrepo in "${repos[@]}"] 
echo '[===== Backup repository: repo_name_one repo_name_two =====]'
[===== Backup repository: repo_name_one repo_name_two =====]
git clone 'https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/repo_name_one repo_name_two'
Cloning into 'repo_name_one repo_name_two'...
fatal: unable to access 'https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/repo_name_one repo_name_two/': The requested URL returned error: 505