I am trying to add the Gitlab repo to Argo CD but it is throwing this error. Unable to connect HTTPS repository: unexpected client error: unexpected requesting "https://git.blahhh.blahh//info/refs?service=git-upload-pack" status code: 400 I used SSH connection with a private key but still unable. Security Group has been configured adequately.
Argocd Connection to GITLAB repo
17k views Asked by Turgut At
2
There are 2 answers
1
On
Based on the error message the Argo CD application is configured to use HTTP URL, not SSH. In order to access the repository using SSH key, you need to register SSH URL with the key and use the same URL as application source repo. E.g.
argocd repo add ssh://[email protected]:2222/repos/repo --ssh-private-key-path ~/id_rsa
argocd app create guestbook \
--repo ssh://[email protected]:2222/repos/repo \ # URL must start from "ssh://"
--path guestbook \
--dest-namespace default \
--dest-server https://kubernetes.default.svc
For gitlab repos you have to pass the full repo name including .git. like
https://gitlab.com/group/repo.git