-
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
Unable to create application from a connected Azure DevOps server repository #6362
Comments
@nilic This error is from github directly. While accessing a repo, github returns
|
I'm not sure how this is related to my issue, since I'm not using GitHub, but Azure DevOps server. Although I agree that this seems to be a backend-specific problem. After reading the following on authenticating to Azure DevOps through HTTPS using PAT: I've decided to workaround the issue by adding the Azure DevOps repository via SSH, in which case new app creation works fine. |
@nilic we have successfully used azure devops with argo by creating the PAT from the clone window. There it specifies the exact username to use. This does work, random username does not: |
That's interesting - it seems that this is an Azure DevOps Services feature, since I don't have that option in Azure DevOps Server 2020: I have created the PAT as described here and no username was given. Here are some findings:
So it's seems the behavior also depends on the |
I met same problem with nilic |
I am having the same problem, did someone figured this out? |
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 |
@AtzeDeVries Does this work on AzDO Server? |
We could not get this working on azdo server because apparently azdo server requires some git extensions that the go got client does not support. Only works on azdo cloud. |
Any updates on this? Did anyone find any workarounds? Looks like MS is the only who requires multi-ack functionality and |
@luber I think using ssh. However, expect problems. Firstly, with on-prem hosting. You're going to run into: https://argo-cd.readthedocs.io/en/release-2.0/user-guide/private-repositories/#unknown-ssh-hosts Fix for me by doing:
Then, because ArgoCD removed support for SHA-1 signature hash algorithm and Azure Devops still seems to be on SHA-1 [1] [2] Think you may need to modify argocd install to support signature hash algorithm AzDO supports sort of like this #6812 (comment) I got to this point and we decided to start migrating off Azure Devops to Github instead because we doubt Microsoft is going to continue to support Azure Devops on the same level as Github in the future. |
For Azure DevOps Server 2020 Update 1.1 this workaround is needed: #6812 (comment), just replace Azure DevOps Server 2022 RC2 adds support for additional signature algorithms besides |
I have tested ArgoCD v2.5.0+a765c14 with Azure DevOps Server 2022 RC2 and can confirm that the |
@nilic Hi, do you have the instruccions to connect to Azure devops? IM starting to get lost with many |
Azdo on prem 2020 does not work, if you upgrade to 2022 it will work. |
AFAIK, AzDO Server (aka on-prem) can't work with HTTPS, only SSH. AzDO Server 2020 works as described in #6362 (comment), while AzDO Server 2022 doesn't need that workaround (works out of the box). A few additional notes on adding AzDO Server to ArgoCD via SSH:
I don't use Azure DevOps Services (aka cloud) so can't comment on its interoperability with ArgoCD. |
Azure devops services is fully working |
Checklist:
argocd version
.Describe the bug
After not being able to connect a private Azure DevOps server repository to ArgoCD via username and password (with error returned "Unable to connect HTTPS repository: authentication required)", I have successfully connected the repo via Personal Access Token (PAT):
When I try to create an application using the repository, I get the following error:
Unable to create application: application spec is invalid: InvalidSpecError: Unable to get app details: rpc error: code = Internal desc = Failed to fetch 493dd952d54b8817daa972adc056d32a1f31231a:
git fetch origin --tags --forcefailed exit status 128: fatal: Authentication failed for '<redacted>/_git/argocd-apps/'
PAT used has Full Access scope and works with
git
operations to the repo, which was tested locally withgit clone
andgit fetch origin --tags --force
which is reported in the ArgoCD error message.My guess is that this is related to Azure DevOps not allowing PAT authentication with a non-empty username (tested locally with
git
), while ArgoCD requires username to be a non-empty string when adding repository credentials. ArgoCD is probably passing this username to Azure DevOps which results in the mentioned error. Related issue: #6098To Reproduce
Expected behavior
ArgoCD application is successfully created.
Screenshots
Version
The text was updated successfully, but these errors were encountered: