-
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
2.12.x throws could not read Username for 'https://gitlab.com' from the UI #19585
Comments
Hi together, i have the same issue with 2.12.X and it seems that the login to the repository works (it is green) but the Projects and Applications are not able to access the credentials. |
@c-buisson and @argo1984 can you give the specs of the applications which are failing, and the (redacted) specs of the repo credentials that are expected to work with these applications? I suspect shenanigans from #18388. |
+1 to Blake's question, but to anyone who's experiencing this issue. :-) |
hi there, we're facing the same problems and I read through #19587 IMO we should not be affected with our setup but are still getting the listed error.
the appset of project-1 is deployed to the admin-project, that's why we are having the same secret two times, but with different project scope, so that the admin project is able to generate the apps. If now the new way to match repo creds to apps is using project + url - I don't see why our setup is failing :( The apps themselves have no connection problems.
We are facing this problem with all our Appsets, above is just one example. |
I suspect it's the same thing actually :( An applicationset doesn't have a project; it's admin-scoped. I believe the resolution is exactly the same as for #19587 - having a repo-cred that doesn't have a |
yep that did indeed fix it. I now understand what you mean :D We actually deploy our appsets, with one bootstrapping app, that one has set a project. But since AppSets do not have the key, it all makes sense now! :) The downside now is, that the repo creds can now be used by all projects. thank you! :) |
Yes, that is true; that was however the same behavior in < 2.12. A workaround for that would be to disallow that source to be used in your apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: < project-1 >
spec:
sourceRepos:
- '!https://gitlab.xxxxx/project-1/deployment.git' |
I actually never knew that before I read through the issue/pr to enhance the situation :D thanks! :) |
I am confused. I am seeing this error after upgrading from apiVersion: v1
kind: Secret
metadata:
labels:
argocd.argoproj.io/secret-type: repository
name: repocred-gitoops
namespace: argocd
type: Opaque
data:
password: base64(somePassword)
url: base64(https://internal-url/some-group/gitoops.git)
username: base64(gitlab+deploy-token-62)
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
annotations:
argocd.argoproj.io/tracking-id: bootstrap:argoproj.io/AppProject:argocd/egs-external
finalizers:
- resources-finalizer.argocd.argoproj.io
labels:
argocd.argoproj.io/instance: bootstrap
name: egs-external
namespace: argocd
spec:
clusterResourceWhitelist:
- group: '*'
kind: '*'
description: EGS External Cluster
destinations:
- name: egs-external
namespace: '*'
sourceRepos:
- '*'
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/tracking-id: bootstrap:argoproj.io/Application:argocd/netshoot
labels:
argocd.argoproj.io/instance: bootstrap
name: netshoot
namespace: argocd
spec:
destination:
name: egs-external
namespace: default
project: egs-external
source:
path: netshoot
repoURL: https://internal-url/some-group/gitoops.git
targetRevision: HEAD I've tried to debug this for hours, but I am none the wiser. |
@ChristianCiach from what I can see you should indeed be unaffected - does rolling back to 2.11.x solve your issue? |
@blakepettersson Yes, downgrading immediately fixes all apps, and upgrading immediately triggers the issue again. Weird.. |
@ChristianCiach are you sure that there are no other repo-creds making use of the same repo url? |
@blakepettersson This is a small test cluster. There is a single other repo-cred (not technically, they are both |
That other |
It is not. It is used for my Unsurprisingly, deleting this other secret breaks the |
@ChristianCiach are you around on the CNCF slack? |
@blakepettersson Not yet, but I could change that :) I was just about to leave for vacation for the next three weeks, but this is too interesting to let go. Give me a few minutes to figure out how to join the slack channel. Btw, the crazy thing is that I can sync the applications just fine! Argo CD picks up the changes from the repo without issues. It's just the UI that shows this error message all the time... |
Weird... The error message disappears from the UI as soon as I sync the application, even if there are no changes. I need to do this once for each application, even though they are all synced from the same git repository. But the error message is gone for good after syncing each application once. (We don't use auto-sync in this cluster) |
This may or may not have something to do with the fact that we moved the gitlab project from one group to another group (on the same server) last week. But we did this way before upgrading Argo CD to v2.12, including updating all Anyway, I seem to be the only one affected by this, so this probably has something to do with dirty caches and the recently moved git repo, so we probably shouldn't think too hard about this. I probably should have started with this information, so I'm sorry about that! |
So private (project-scoped) repositories now can not be used in other projects, similar to clusters. It seems right, but for clusters we have
Apps and appsets can only reside in ArgoCD cluster (can be in separate namespace, but still) so I do:
With 2.11 this workflow is possible, but with 2.12 master app will throw error, because supplementary project no longer can access repo (it is bound to another project). I think it still possible, because now we have ability to add duplicate repo to supplementary project with same credentials. But it adds another burden of duplicating user-provided credentials, not to mention it looks awful. Some project setting like |
Related to argoproj#18748,argoproj#19585 and argoproj#19587. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
* docs: note cluster scoping changes in 2.12x Related to #18748,#19585 and #19587. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * docs: add note in projects doc. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
* docs: note cluster scoping changes in 2.12x Related to #18748,#19585 and #19587. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * docs: add note in projects doc. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
* docs: note cluster scoping changes in 2.12x Related to #18748,#19585 and #19587. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * docs: add note in projects doc. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Same here, I had to downgrade as I having random issues with this message. I use the matrix generator with git files and clusters. I specified the project in the cluster secret as stated in the upgrade instructions, but getting this anyway. The git credentials do also must have the project set in? All matrix generators working just fine in v2.11.7, but in v2.12.3 I'm receiving this. Applications not using the matrix generator do not have this message. |
@yevon in the case of applicationsets you would need to have the |
@moonkaktus having a In that case it would mean that for a given project it would not be allowed to use globally scoped repositories? |
@blakepettersson I think global repositories should be allowed to every project, as now. But restriction to use only project-scoped repositories of one project should be switchable for that project (like |
I do use ApplicationSet, but I specify the project for the Application spec itself, not for the ApplicationSet spec. Do I must unset the Application project? I just have this but it was not working:
|
I just ran into this issue and removing the project from the repository secret seemed to work. I didn't need to remove project from my ApplicationSet (and you seemingly can't anyway, it's invalid). As soon as I did that, my ApplicationSet deployed. This is quite a confusing error at first, because an Application will have no issue with Git, but the Git generator for an ApplicationSet mysteriously complains it can't find credentials. The logs seem useless here and don't really provide any hint. |
I have the same issue with argocd 2.12.4 ...any update for this? Rolling back to 2.11.7 working for me |
When I upgrade argocd to 2.12.4. It can't list private helm charts on bitbucket |
Hi @blakepettersson , thank you for all your valuable inputs in this thread. We are facing similar error when using applicationset along with git generator on "argo v2.12.3+6b9cd82" . We have connected the same repo in default appProject and other appProject (e.g dev or prod for other applications ) , now seeing below issue, so do we need connect the same repo without specifying anything in
We have added https://<internal_giltab_url>/dlp/dss-infrastructure/dss-argocd.git repo in default and dev appProject. Both secret has project. k get secret repo-2902974994 -o yaml -n dlp-argocd
k get secret repo-1152428332 -o yaml -n dlp-argocd
ApplicationSet
|
creds made before 2.12 were made in the UI and just broke git generators. I manually removed the project field from the repo secrets in the cluster and everything works. |
Is this resolved? |
Is this resolved ? |
I had to delete the project from my cluster and repo secrets because if I dind't do it it won't work. I think I have all my applications and applicationsets with the same project set, but even with that it wasn't working. What should I check if I want to restore the project to my secrets? |
I'd like to add that the path forward for preparing for this breaking change is also not ideal, and the upgrading docs are unclear that Let's say that I have a repository secret with It seems that in 2.11, this isn't possible. I get a conflict saying that it needs to be a forced operation to overwrite the existing repo secret since there are conflicts on the I'm assuming that if I upgraded to 2.12, I'd be able to add more secrets for the same repository (scoped to individually separate projects)? If anything, and based on the issues present for this today, could we get some expanded language in the upgrading documentation that you will need to edit the secret and remove the |
I've solved the problem by recreating secrets (I left the projects in place). |
I found a new one with this:
For me what I could reproduce still in latest v2.13.0+347f221 about this is:
The behaviour is completely opposite depending if you are acessing your repository through HTTP or SSH(git@domain...), that's the reason about the confusion all together, it doesn't follow the behaviour described in the upgrade notes of 2.12.x. |
@vertrost If I disconnect the repositories and reconnect them, will the applications be affected? |
I had to replace sourceRepos to * in my AppProject definition, because if I did place a git@....git repository, it didn't recognize it and it says that I'm not allowed to pull changes from that git repo: apiVersion: argoproj.io/v1alpha1 The behaviour of project matching with secrets is not working properly, it differs when you use http git repositories, or ssh git repositories. |
We have faced with the same issue. The main reason for this issue is here #18388 In our case, it was related to ApplicationSet, there is also a note on the official documentation: We have changed the |
Checklist:
argocd version
.Describe the bug
Since 2.12.x, the UI throws this error message:
To Reproduce
Upgrade to
2.12.x
from2.11.x
with connectivity to Gitlab repositories.Using Helm chart version
7.4.4
Expected behavior
UI able to refresh Applications from Gitlab.
Screenshots
Logs
The text was updated successfully, but these errors were encountered: