Azure / acr-build

Github action to build containers with Azure Container Registry
MIT License
19 stars 25 forks source link

Failed to download source code #14

Open nithin-nk opened 1 year ago

nithin-nk commented 1 year ago

I am trying to build ACR image with the following code

      - name: ACR build
        id: build-push-acr
        uses: azure/acr-build@v1
        with:
            service_principal: ${{ secrets.service_principal }}
            service_principal_password: ${{ secrets.service_principal_password }}
            tenant: ${{ secrets.tenant }}
            registry: ${{ secrets.registry }}
            repository: ${{ secrets.repository }}
            image: flink-image
            git_access_token: ${{ secrets.git_access_token }}
            folder: ./deployments
            branch: main
            tag: ${{ github.sha }}
            dockerfile: ./deployments/Dockerfile

I am getting the below mentioned error

Downloading source code... 45 Run ID: cb8 failed after 3s. Error: failed to download context. Please check if the URL is incorrect. If it has credentials, please check if they are expired

I am not using any URL in configuration

Kindly help

darena-patrick commented 1 year ago

I have the same issue - did you figure this out?

john-liezers commented 1 year ago

I had the same problem, check if your organization uses SAML SSO, if it does you need to 'enable' your PAT token.

You can go into the Personal Access Token settings and choose "Configure SSO". From there, you can enable the token for the specific organization that you're using. After that point, using it as normal should work.

Malay-Acharya commented 1 year ago

Any updates on this? Facing the same issue.

foliveiraGH commented 9 months ago

🔍 the same here.

Malay-Acharya commented 9 months ago

🔍 the same here. Try changing the Git Access Token. That worked for me. Use the classic token, the new ones didn't work for me.

brandonstarxel commented 2 weeks ago

They mean add a git_access_token line like at the end here: uses: azure/acr-build@v1 with: service_principal: ${{ secrets.service_principal }} service_principal_password: ${{ secrets.service_principal_password }} tenant: ${{ secrets.tenant }} registry: ${{ secrets.registry }} repository: ${{ secrets.repository }} image: ${{ secrets.image }} branch: main tag: ${{ github.sha }} git_access_token: ${{ secrets.GIT_ACCESS_TOKEN }}

That GIT_ACCESS_TOKEN you get from PAT: https://github.com/settings/tokens