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

azure devops git repo unable to use git artifact #10600

Closed
2 of 3 tasks
kmcrawford opened this issue Feb 27, 2023 · 6 comments · Fixed by argoproj-labs/go-git#9 or #10953
Closed
2 of 3 tasks

azure devops git repo unable to use git artifact #10600

kmcrawford opened this issue Feb 27, 2023 · 6 comments · Fixed by argoproj-labs/go-git#9 or #10953
Assignees
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority type/bug

Comments

@kmcrawford
Copy link

kmcrawford commented Feb 27, 2023

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

I am testing a private azure git artifact utilizing the information from the clone screen on azure devops:

image

I have created the ado-creds with the correct information.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: input-artifact-git-
spec:
  entrypoint: git-clone
  templates:
    - name: git-clone
      inputs:
        artifacts:
          - name: argo-source
            path: /src
            git:
              repo: https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo
              branch: master
              usernameSecret:
                 name: ado-creds
                 key: username
              passwordSecret:
                 name: ado-creds
                 key: password
      container:
        image: golang:1.10
        command: [sh, -c]
        args: ["git status && ls && cat VERSION"]
        workingDir: /src

Logs init: (real repo replaced with:https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo )

input-artifact-git-7n5nk: time="2023-02-27T17:27:58.632Z" level=info msg="Start loading input artifacts..."
input-artifact-git-7n5nk: time="2023-02-27T17:27:58.632Z" level=info msg="Downloading artifact: argo-source"
input-artifact-git-7n5nk: time="2023-02-27T17:27:58.992Z" level=info msg="Load artifact" artifactName=argo-source duration=359.334293ms error="failed to clo
ne \"https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo\": unexpected client error: unexpected requesting \"https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo/git-upload-pack\" status code: 400" key=
input-artifact-git-7n5nk: time="2023-02-27T17:27:58.992Z" level=error msg="executor error: artifact argo-source failed to load: failed to clone \"https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo\": unexpected client error: unexpected requesting \"https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo/git-upload-pack\" status code: 400"
input-artifact-git-7n5nk: time="2023-02-27T17:27:58.992Z" level=info msg="Alloc=9612 TotalAlloc=15528 Sys=22994 NumGC=4 Goroutines=3"
input-artifact-git-7n5nk: time="2023-02-27T17:27:58.992Z" level=fatal msg="artifact argo-source failed to load: failed to clone \"https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo\": unexpected client error: unexpected requesting \"https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo/git-upload-pack\" status code: 400"

Version

v3.4.5, v3.4.4

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: input-artifact-git-
spec:
  entrypoint: git-clone
  templates:
    - name: git-clone
      inputs:
        artifacts:
          - name: argo-source
            path: /src
            git:
              repo: https://xxxxx.visualstudio.com/My%20Agile%20Projects/_git/My_Repo
              branch: master
              usernameSecret:
                 name: ado-creds
                 key: username
              passwordSecret:
                 name: ado-creds
                 key: password
      container:
        image: golang:1.10
        command: [sh, -c]
        args: ["git status && ls && cat VERSION"]
        workingDir: /src

Logs from the workflow controller

empty

Logs from in your workflow's wait container

empty
@caelan-io caelan-io added the area/artifacts S3/GCP/OSS/Git/HDFS etc label Mar 2, 2023
@caelan-io
Copy link
Member

Thanks for reporting this issue and including init logs. Do you know if this was working on a prior version for you? Are you able to include controller logs as well?

@mfabbri
Copy link

mfabbri commented Mar 10, 2023

We are in a very similar situation trying to execute the same git-clone workflow (Argo workflow version 3.4.5) but with an Azure devops repo
https://dev.azure.com/<org>/folder/_git/customerdata

We tested different combinations of this git-clone workflow:

  • with and without "singleBranch" property
  • with user password
  • with Azure PAT
  • with and without usernameSecret
  • using the URL with organization name https://<org>@dev.azure.com/<org>/folder/_git/customerdata

but we are always getting an "authentication required" error

time="2023-03-06T14:18:32.495Z" level=info msg="Processing workflow" namespace=argo workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="Task-result reconciliation" namespace=argo numObjs=0 workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="Pod failed: Error (exit code 1): artifact argo-source failed to load: failed to clone \"https://dev.azure.com/<org>/folder/_git/customerdata\": authentication required" displayName=input-artifact-git-xz775-hdbrr namespace=argo pod=input-artifact-git-xz775-hdbrr templateName=git-clone workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=argo new.phase=Error workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="marking node as failed since init container has non-zero exit code" namespace=argo new.phase=Failed workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="node changed" namespace=argo new.message="Error (exit code 1): artifact argo-source failed to load: failed to clone \"https://dev.azure.com/<org>/folder/_git/customerdata\": authentication required" new.phase=Failed new.progress=0/1 nodeID=input-artifact-git-xz775-hdbrr old.message= old.phase=Pending old.progress=0/1 workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="TaskSet Reconciliation" namespace=argo workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg=reconcileAgentPod namespace=argo workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="Updated phase Running -> Failed" namespace=argo workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="Updated message  -> Error (exit code 1): artifact argo-source failed to load: failed to clone \"https://dev.azure.com/<org>/folder/_git/customerdata\": authentication required" namespace=argo workflow=input-artifact-git-xz775-hdbrr
time="2023-03-06T14:18:32.495Z" level=info msg="Marking workflow completed" namespace=argo workflow=input-artifact-git-xz775-hdbrr

Any clues? Thank you

@stale
Copy link

stale bot commented Mar 25, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

@stale stale bot added the problem/stale This has not had a response in some time label Mar 25, 2023
@caelan-io caelan-io removed the problem/stale This has not had a response in some time label Mar 27, 2023
@caelan-io caelan-io added P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority and removed P3 Low priority labels Mar 30, 2023
@rohankmr414 rohankmr414 reopened this Apr 21, 2023
rohankmr414 added a commit to rohankmr414/argo-workflows that referenced this issue Apr 21, 2023
Signed-off-by: Rohan Kumar <rohan@pipekit.io>
terrytangyuan pushed a commit that referenced this issue Apr 21, 2023
Signed-off-by: Rohan Kumar <rohan@pipekit.io>
JPZ13 pushed a commit to pipekit/argo-workflows that referenced this issue Jul 4, 2023
@MarcoFabbri-orienteed
Copy link

Hi all,
the issue is closed but I still have an authentication issue on Azure devops with the git artifact example

https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-git.yaml

artifact argo-source failed to load: failed to clone "https://<org>@dev.azure.com/<org>/folder/_git/customerdata": unexpected client error: unexpected requesting "https://<org>@dev.azure.com/<org>/folder/_git/customerdata/git-upload-pack" status code: 400

This error is thrown using Argo Workflow 3.4.9: any idea?

Thanks

@EladAviczer
Copy link

Hi all, the issue is closed but I still have an authentication issue on Azure devops with the git artifact example

https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-git.yaml

artifact argo-source failed to load: failed to clone "https://<org>@dev.azure.com/<org>/folder/_git/customerdata": unexpected client error: unexpected requesting "https://<org>@dev.azure.com/<org>/folder/_git/customerdata/git-upload-pack" status code: 400

This error is thrown using Argo Workflow 3.4.9: any idea?

Thanks

i'm having the same issue

@mfabbri
Copy link

mfabbri commented Nov 2, 2023

Hi @EladAviczer, I opened a new ticket and added more information as requested. You can follow it here #11705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority type/bug
Projects
None yet
7 participants