'Docker pull failed - Authentication required

We are using GitHub actions to pull docker image:

  sometestjob:
    name: Some testing
    runs-on: [self-hosted, kubernetes, on-prem]
    services:
      db:
        image: artifactory.io/someimage
        ports:
          - 2010:9000
        options: --name some_test --health-cmd "ycqlsh --debug" --health-interval 5s --health-retries 10
    steps:
      - name:  step1
       

When running job sometestjob, error shows: Error response from daemon: Head "https://artifactory.io/someimage/manifests/latest": unknown: Authentication is required

To pull the image, username & password has to be provided


How to add credentials(username/password) to service db?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source