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

Make multiple different Argo CD projects using a single repository #9581

Closed
d7volker opened this issue Jun 4, 2022 · 15 comments · Fixed by #18290 or #18388
Closed

Make multiple different Argo CD projects using a single repository #9581

d7volker opened this issue Jun 4, 2022 · 15 comments · Fixed by #18290 or #18388
Labels
enhancement New feature or request

Comments

@d7volker
Copy link
Contributor

d7volker commented Jun 4, 2022

Summary

The developers should be able to define the repositories on their own. That is why we use scoped repositories in this case. Now it can happen that developers out of two different Argo CD projects use the same repository even with different repository credentials. As you know it is impossible to define a repository twice. I would say it is a problem for us that a repo can't be defined twice or more times. As I understood you use the repo URL as the key to refer to it.

Why it is not possible to use the repo URL and the Argo CD project it is bound to as a key?

Are there other possibilities to achieve that two different Argo CD projects use same repository without bother the admins of Argo CD? For example with a dedicated RBAC rule?

Motivation

That would also be of help in the following: Imaging a Argo CD project which is able to deploy its code on development and integration but not on production. The deployment on to production will be handled by a different Argo CD project using the same repository as the developers in the first project.

Proposal

As I understood you use the repo URL as the key to refer to it.
Why it is not possible to use the repo URL and the Argo CD project it is bound to as a key?

@d7volker d7volker added the enhancement New feature or request label Jun 4, 2022
@m-yosefpor
Copy link
Contributor

We have the same problem and it is causing many troubles for devs. Also I think the project of each repo should be showed in argocd UI (setting > repositories).

@crenshaw-dev
Copy link
Member

I think a lot of Argo CD code assumes that a repo (of a given URL) is a repo. I agree, we should provide a mechanism to use the same repo using different credentials. It would take some work on the backend, but should be possible.

@alemnew
Copy link

alemnew commented Mar 9, 2023

Has there been any update on this? I also got this issue, and wouldn't appreciate if there has been a mechanism.

@dario-lab
Copy link

Hi,
I have an issue where:

  1. I added via UI repository to the project: Project1 HELM: helm.repo.io and this repository is working properly.
    After it I tried add the same repository to the Project-2, but I have an issue:
    Unable to connect HTTPS repository: existing repository spec is different; use upsert flag to force update; difference in keys "Name,Project"

What can i do to use the same repository in many projects?

@acuD1
Copy link

acuD1 commented Apr 11, 2023

Hi,

Just encountered this behavior. We're splitting our environments with Project. As we use the same repository with Helm in front, I can't.

Regards.

@pazfelipe
Copy link

Any updates? I've been facing the same issue already mentioned here
Unable to connect HTTPS repository: existing repository spec is different; use upsert flag to force update...

@lacrimal
Copy link

Is it idea similar to Google Anthos multi-repo ?
I'm looking something similar in argo-cd and stuck, at beginning was getting this feature obvious.

@FsRiachos
Copy link

Hi there,

since there any update to the issue is there any workaround?

Thank you

@manali14
Copy link

manali14 commented Sep 4, 2023

Hi,

Is there a workaround that people are using for this?

@m-yosefpor
Copy link
Contributor

You can use global repos and limit access with approj (the old way). Though this renders the whole point of scoped repositories useless

@SakaYK
Copy link

SakaYK commented Dec 17, 2023

as mentioned by m-yosefpor, you can use global repo and chose the repository in the project.
i'm using this method since v2.4.8, to use the same helm repository in multiple project environment.

  1. Go to repositories menu and create helm repository connection but don't attach it to any project.
  2. Create/Edit your project, Find the SOURCE REPOSITORIES and click the edit button., and chose the helm repository that you create earlier.
  3. Repeat Step-2.

@yyzxw
Copy link
Contributor

yyzxw commented Mar 27, 2024

Hi, is there any way to make different appProject contain different repository, or the same repoURL can have different credentials, for example, the same repoURL can create different Argocd applications in the same repository but different directories, or any workaround?

Thank you

@ahmadalkhansa
Copy link

Hi, is there going to be modifications to the management of git repository connections? It would create conflict and confusion among users that have access to separate projects and would like to connect to the same repositories.

@blakepettersson
Copy link
Member

Hi, see #18290 - let me know what you think

@blakepettersson
Copy link
Member

Reopening since that was the spec that got merged, not the actual implementation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet