Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

** (System.EnvError) could not fetch environment variable "AWS_ACCESS_KEY_ID" because it is not set #67

Closed
nelsonic opened this issue Jun 14, 2023 · 9 comments
Assignees
Labels
chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

https://github.com/dwyl/imgup/actions/runs/5261384190/jobs/9509426771#step:4:26
image

/home/runner/work/_temp/.setup-beam/elixir/bin/mix local.rebar --force
  ** (System.EnvError) could not fetch environment variable "AWS_ACCESS_KEY_ID" because it is not set
      (elixir 1.14.2) lib/system.ex:706: System.fetch_env!/1
      /home/runner/work/imgup/imgup/config/config.exs:54: (file)
      (stdlib 4.1.1) erl_eval.erl:748: :erl_eval.do_apply/7
      (stdlib 4.1.1) erl_eval.erl:961: :erl_eval.expr_list/7
      (stdlib 4.1.1) erl_eval.erl:290: :erl_eval.expr/6
      (stdlib 4.1.1) erl_eval.erl:[28](https://github.com/dwyl/imgup/actions/runs/5261384190/jobs/9509426771#step:4:31)2: :erl_eval.expr/6
      (stdlib 4.1.1) erl_eval.erl:961: :erl_eval.expr_list/7
  Error: The process '/home/runner/work/_temp/.setup-beam/elixir/bin/mix' failed with exit code 1

Tried to add: https://github.com/dwyl/imgup/settings/secrets/actions but got the following error:
image

Failed to add secret, a secret with the same name (AWS_ACCESS_KEY_ID) already exists.
@nelsonic nelsonic added chore a tedious but necessary task often paying technical debt technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Jun 14, 2023
@nelsonic nelsonic self-assigned this Jun 14, 2023
@nelsonic nelsonic added the T25m Time Estimate 25 Minutes label Jun 14, 2023
@nelsonic
Copy link
Member Author

Gonna remove the Repository Secrets as they don't appear to be accessible from GitHub Actions ...

image

@nelsonic
Copy link
Member Author

Tried adding the vars to the ci.yml: 52b6cbd

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Still failing: https://github.com/dwyl/imgup/actions/runs/5261650240/jobs/9510007476#step:4:26
image

@nelsonic
Copy link
Member Author

Oh wow ... this is seriously convoluted ... https://github.com/orgs/community/discussions/25171#discussioncomment-3246706 🙄

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Error: Unable to process command '::set-env name=AWS_ACCESS_KEY_ID::***' successfully.

https://github.com/dwyl/imgup/actions/runs/5261770262/jobs/9510260164#step:3:6
image

nelsonic added a commit that referenced this issue Jun 14, 2023
@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Looks like the problem is System.fetch_env!/1 not GitHub Actions Secrets availability ... 🤦‍♂️
https://github.com/dwyl/imgup/actions/runs/5262180969/jobs/9511119429#step:8:9
image

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Fixed in #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Status: Done
Development

No branches or pull requests

1 participant