0

When I am using this command to login docker in GitHub Actions:

docker login --username=${{ secrets.ALIYUN_DOCKER_REPO_USER_NAME }} --password=${{ secrets.ALIYUN_DOCKER_REPO_USER_PASSWORD }} registry.cn-hangzhou.aliyuncs.com

shows error:

Run docker login --username=*** --*** registry.cn-hangzhou.aliyuncs.com
Error: Cannot perform an interactive login from a non TTY device
Error: Process completed with exit code 1.

what should I do to fix this problem? This is my full GitHub Action CI script:

- name: Build image push to aliyun
  run: |
    docker login --username=${{ secrets.ALIYUN_DOCKER_REPO_USER_NAME }} --password=${{ secrets.ALIYUN_DOCKER_REPO_USER_PASSWORD }} registry.cn-hangzhou.aliyuncs.com
    docker build -f dolphin-acientbay/Dockerfile -t="${namespace}/dolphin-acientbay-service:v1.0.0" .

runs on Ubuntu operation system.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Dolphin
  • 499
  • 1
  • 13
  • 36

2 Answers2

1

It will decide that the interactive login is required if the secrets.* stuff is not actually set. To test, try to substitute the values for the actual username and password.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
xxor
  • 97
  • 4
0

I just ran into this problem. It is fine to submit the code myself to trigger the script execution, but this error is reported when the pull request is executed.

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 04 '22 at 09:05