You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi team,
I install self-hosted runner according to git hub guideline in my local windows11 , and i use aws sso login , get the aws credential in my local.
aws cli:
according to this doc , if the local runner has access to AWS credentials, such as an EC2 instance, then you do not need to provide IAM user access key credentials to this action. We will use the standard AWS JavaScript SDK credential resolution methods to find your credentials, https://github.com/aws-actions/configure-aws-credentials
but seems like the results shows "Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers"
any configurations missing?
in the my terraform repo code, i use different profile setting in my local for different aws environment/account under different terraform folder(different terraform state file). So i need at least one profile can work in pipeline line, if also can configure the profile in git actions is perfect
give one aws dev account for example, i can use the profile approach setup resource in my local
Expected Behavior
i suppose the result running the aws sts get-caller-identity in pipeline get the same result from my local aws sts command line , but get error in pipeline
Current Behavior
Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
Reproduction Steps
install the self x64 windows hosted in your local windows11
config the aws sso login in your local windows11
set below workflow file in the repo
trigger the pipeline manually
Workflow file for this run:
name: 'Win_Deploy'
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build:
name: 'Terraform'
runs-on: self-hosted
steps:
# Clone the repository to the GitHub Actions runner
- name: Clone
uses: actions/checkout@v2
# Configure AWS Credentials
# You will need to replace <IAM_ROLE> with the IAM role ARN you created in the previous step
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: eu-central-1
- name: Sts GetCallerIdentity
run: |
aws sts get-caller-identity
- name: List S3 bucket
run: |
aws s3 ls
- name: Publish on aws dev env
if: github.ref == 'refs/heads/master'
run: ./publish_win.ps1 dev
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered:
if i remove aws credential setting in pipeline, i will get Error: failed to get shared config profile, my-dev-admin-profile when execute terraform plan command line Workflow file for this run:
name: 'Win_Deploy'
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build:
name: 'Terraform'
runs-on: self-hosted
steps:
# Clone the repository to the GitHub Actions runner
- name: Clone
uses: actions/checkout@v2
# Configure AWS Credentials
# You will need to replace <IAM_ROLE> with the IAM role ARN you created in the previous step
- name: Get AWS Configure List
run: |
aws configure list
- name: Publish on aws dev env
if: github.ref == 'refs/heads/master'
run: ./publish_win.ps1 dev publish_win.ps1:
Param(
[string]$Env = 'dev'
)
if ($Env -eq 'dev') {
Write-Host('dev')
$currentPath = Get-Location
Write-Host "Current Path 1: $currentPath"
Write-Host('change path to \terraform\env\dev ')
Push-Location .\terraform\env\dev
Write-Host('terraform init')
terraform init --plugin-dir D:\Rancher\terraform.terraform.d\terraform-plugin-cache
Write-Host('terraform validate')
terraform validate --json
Write-Host('terraform fmt')
terraform fmt
Write-Host('terraform plan')
terraform plan
i execute aws sso login, and i can get dev profile result for aws configure list --profile my-dev-admin-profile in my local, but when running the pipeline i get error "Error loading SSO Token: Token for my-sso does not exist", is that any configuration missing?
name: 'Win_Deploy'
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build:
name: 'Terraform'
runs-on: self-hosted
steps:
# Clone the repository to the GitHub Actions runner
- name: Clone
uses: actions/checkout@v2
# Configure AWS Credentials
# You will need to replace <IAM_ROLE> with the IAM role ARN you created in the previous step
- name: Get AWS Configure List
run: |
aws configure list --profile my-dev-admin-profile
- name: Publish on aws dev env
if: github.ref == 'refs/heads/master'
run: ./publish_win.ps1 dev
Describe the bug
hi team,
![image](https://private-user-images.githubusercontent.com/13114985/331753600-6d146d97-8dfa-4f16-907f-1af270931976.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5MjQ5MTIsIm5iZiI6MTcxODkyNDYxMiwicGF0aCI6Ii8xMzExNDk4NS8zMzE3NTM2MDAtNmQxNDZkOTctOGRmYS00ZjE2LTkwN2YtMWFmMjcwOTMxOTc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDIzMDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMzMWM2MGM3NTQ3YmQ1NWU5ZjQwNzAyMGMwOGU0NzA1ODMzOTk0MjJhYjg3OTVhMjViYWVmNWFmMjYwOGZhODQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZZjLhCSBqzxPm7dpzqYlCbrGKivc0p_RSKNlTfYqMHM)
I install self-hosted runner according to git hub guideline in my local windows11 , and i use aws sso login , get the aws credential in my local.
aws cli:
according to this doc , if the local runner has access to AWS credentials, such as an EC2 instance, then you do not need to provide IAM user access key credentials to this action. We will use the standard AWS JavaScript SDK credential resolution methods to find your credentials,
https://github.com/aws-actions/configure-aws-credentials
but seems like the results shows "Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers"
any configurations missing?
in the my terraform repo code, i use different profile setting in my local for different aws environment/account under different terraform folder(different terraform state file). So i need at least one profile can work in pipeline line, if also can configure the profile in git actions is perfect
give one aws dev account for example, i can use the profile approach setup resource in my local
![image](https://private-user-images.githubusercontent.com/13114985/331619483-ef28c7f8-8f5c-4a80-84e3-de8fc59d083e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5MjQ5MTIsIm5iZiI6MTcxODkyNDYxMiwicGF0aCI6Ii8xMzExNDk4NS8zMzE2MTk0ODMtZWYyOGM3ZjgtOGY1Yy00YTgwLTg0ZTMtZGU4ZmM1OWQwODNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDIzMDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjODg5ODQ1YThhNDI4NWVkZWI5ZGM2ZGM4YjIwYmVkNzJhMzlhYmU4MWY2Nzk5OGZkYWY2YmM5MTZhZDk0MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JlW4QswVxBdXV3gW5TWCB8dRd_ZhGp7GDnNQNBmvd-g)
Expected Behavior
i suppose the result running the aws sts get-caller-identity in pipeline get the same result from my local aws sts command line , but get error in pipeline
Current Behavior
Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
![image](https://private-user-images.githubusercontent.com/13114985/331615553-e32ce550-06c1-453b-8d74-024e34491a19.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5MjQ5MTIsIm5iZiI6MTcxODkyNDYxMiwicGF0aCI6Ii8xMzExNDk4NS8zMzE2MTU1NTMtZTMyY2U1NTAtMDZjMS00NTNiLThkNzQtMDI0ZTM0NDkxYTE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDIzMDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVhNDZlNGNiM2EyYjE2N2VhNDRiYmZmZTEyZWY1ZTkyNjIxZjI5MTgyNzUxZDZmZDIyNjA2MTM5YWY3NTcwMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QcRxy8jaKAkxvt3C2Zgk48OF3EqF_82W6IgcIcVdgMU)
Reproduction Steps
Workflow file for this run:
name: 'Win_Deploy'
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build:
name: 'Terraform'
runs-on: self-hosted
steps:
# Clone the repository to the GitHub Actions runner
- name: Clone
uses: actions/checkout@v2
# Configure AWS Credentials
# You will need to replace <IAM_ROLE> with the IAM role ARN you created in the previous step
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: eu-central-1
- name: Sts GetCallerIdentity
run: |
aws sts get-caller-identity
- name: List S3 bucket
run: |
aws s3 ls
- name: Publish on aws dev env
if: github.ref == 'refs/heads/master'
run: ./publish_win.ps1 dev
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: