Argocd Connection to GITLAB repo

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.

2 Answers

For gitlab repos you have to pass the full repo name including .git. like https://gitlab.com/group/repo.git

1

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 
1

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobW1sY2l%2BcX2Omqmgp5OZeqS7zaecnKyZpLtuwM5mnqKsnJavbr7EqaY%3D