Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 05:17 AM - edited 08-07-2023 05:18 AM
@dvmentalmadess I found a workaround for this issue, I'm using this init script to create the /home/libraries home folder and give permissions to the libraries user and then using the sudo -u libraries aws codeartifact login command.
#!/bin/bash
# Install AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --version
echo "AWS CodeArtifact login (root)"
aws codeartifact login --tool pip --repository xxxxxx --domain xxxxxx --domain-owner xxxxxx
sudo mkdir /home/libraries
sudo chown libraries:libraries /home/libraries
sudo chmod 755 /home/libraries
sudo -u libraries aws codeartifact login --tool pip --repository xxxxxx --domain xxxxxx --domain-owner xxxxxx
In my init script, I'm running the aws codeartifact login twice, one with the root user and another one with the libraries users.
It worked for me.