question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Environment variable https_proxy is not used

See original GitHub issue

Behaviour

Login to AWS ECR doesn’t work if action is running behind http(s) proxy.

Steps to reproduce this issue

  1. Run self-hosted runner in network environment with blocked internet connection which needs use http_proxy
  2. Set Environment variables http_proxy and https_proxy to correct proxy server
  3. Let login-action to login to (private) ECR
  4. Error: connect ETIMEDOUT 52.119.173.252:443

Expected behaviour

AWS ECR auth token should be retrieved with AWS SDK.

Actual behaviour

##[debug]Save intra-action state isPost = true ::save-state name=registry:😗**.dkr.ecr.us-west-2.amazonaws.com ##[debug]Save intra-action state registry = ***.dkr.ecr.us-west-2.amazonaws.com ::save-state name=logout::true ##[debug]Save intra-action state logout = true Retrieving registries data through AWS SDK… ##[debug]Requesting AWS ECR auth token for *** AWS ECR detected with us-west-2 region Error: connect ETIMEDOUT 52.119.173.252:443 ##[debug]Node Action run completed with exit code 1 ##[debug]Finishing: Login to AWS ECR

Configuration

  • Repository URL (if public): private
  • Build URL (if public): private
      - name: Configure AWS Credentials
        if: github.event_name != 'pull_request'
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-west-2

      - name: Login to AWS ECR
        if: github.event_name != 'pull_request'
        uses: docker/login-action@v1
        with:
          registry: ${{ env.ECR_REPO }}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
crazy-maxcommented, Feb 15, 2022

@svasek Oh sorry I completely forgot that one. Will setup smth this week!

0reactions
svasekcommented, Feb 17, 2022

Hi @crazy-max, 🎉 Congratulation! I can confirm it works like a charm in both scenarios. So, It works even with the aws-actions/configure-aws-credentials.

It’s also not necessary to set additional env for the step if proxy is set in the runner global environment. Thank you very much. Good job!

► Run crazy-max/docker-login-action@aws-sdk-proxy
::save-state name=isPost::true
##[debug]Save intra-action state isPost = true
::save-state name=registry::***.dkr.ecr.us-west-2.amazonaws.com
##[debug]Save intra-action state registry = ***.dkr.ecr.us-west-2.amazonaws.com
::save-state name=logout::true
##[debug]Save intra-action state logout = true
Retrieving registries data through AWS SDK...
##[debug]Requesting AWS ECR auth token for ***
##[debug]Using http proxy http://proxy-us-aws.***.***:3128
##[debug]Using https proxy http://proxy-us-aws.***.***:3128
AWS ECR detected with us-west-2 region
(node:910) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Logging into https://***.dkr.ecr.us-west-2.amazonaws.com...
Login Succeeded!
##[debug]Node Action run completed with exit code 0
##[debug]Finishing: Login to AWS ECR
Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the 'right' format for the HTTP_PROXY environment ...
No, it isn't. You're right that there's a convention to use uppercase for environment variables, but it's only a convention, not an absolute ......
Read more >
We need to talk: Can we standardize NO_PROXY? - GitLab
If you've used a Web proxy server before, you're probably familiar with the environment variables http_proxy or HTTP_PROXY .
Read more >
HTTP_PROXY and HTTPS_PROXY environment variables ...
In a scenario when HTTP_PROXY and/or HTTPS_PROXY environment variable are set in the system, the Git itself works correctly.
Read more >
set http_proxy not working on windows - Stack Overflow
Show activity on this post. First remove spaces beetween = . Then type set without parameter to check your environment variables.
Read more >
How to set up proxy using http_proxy & https_proxy ...
Set up proxy server using http_proxy environment variable. The http_proxy and https_proxy environment variable is used to specify proxy settings to client ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found