-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Use Azure DevOps Git Artefacts with PAT #6289
Comments
Spawned from #5235. |
Adding ADO repo as https repo, with any non-empty username and PAT in place of password works fine. I am using {
"Version": "v2.0.4+0842d44"
} |
Upgraded to Version
The initial connect works (as before), but strangely the Name column in the repos table is also empty .... But when I'm creating a App I still get:
@mohanrajatnetapp: Are you working on a on-Premise DevOps Instance or in the cloud? |
Seems to be the same problem like #6362 |
Cloud Azure DevOps. |
Okay we are using Azure Devops Server 2020, so maybe it‘s just a Problem of the on prem version. |
No updates yet? :( Same issues with Azure Devops on-premise. |
So if you create a PAT for a user (not just a PAT for a specific repo, which is only available in non azdo server) and then create a random username it works. ---
apiVersion: v1
kind: Secret
metadata:
name: azdo-<redacted>-repo-creds
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repo-creds
stringData:
type: git
url: https://dev.azure.com/<redacted>
password: <redacted>
username: argocd |
My app is in a failed state. Message:
|
Just as a heads-up, we presumably found the root cause for this, refer to #11914 - with that implemented, Azure DevOps on-prem should work using HTTPS with Argo CD without any workarounds. |
There may be other things happening here... Had a similar issue in the past with GIT repositories. Depending on the host configurations and perhaps hardening, inline PATs (in the url) no longer work. Must pass a base64 authentication header such as:
which would have the Base64 representation of ":myPAThere" (empty user name, : and PAT value).
In GIT, for instance, we can get around the inline PAT by passing an http.extraheader= to the --config-env parameter. I don't think that ArgoCD is implementing this usecase or provides an ability to add an extra header. Would be great if they'd provide an option to include extraheader (or similar) values for folks with hardened platforms. |
Summary
Connect a private AzureDevOps Git Repo, with PAT (Combined Token: Authenticity + Secret). As the documentation stated, I tried:
Then, connect the repository using any non-empty string as username and the access token value as a password see.
where I used the PAT as access token.
The Error I'm getting on the argo-cd Side: git did not exit cleanly (exit code 128)
Use Cases
When having the config (kustomize) stored in an AzureDevOps Git Repo.
My setup:
According to microsoft docs the only working solution is http header basic auth (but thats just a ugly workaround and not suitable for production use):
Message from the maintainers:
Seems to be the same problem like #6362
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: