vfarcic / crossplane-tutorial

42 stars 276 forks source link

GH CLI using git/ssh #6

Closed royveshovda closed 5 months ago

royveshovda commented 5 months ago

ArgoCD got a SSH_AUTH_SOCCK error after running your setup/00-intro.sh script. By manually changing to https (from git@) instead, everything started to work. I narrowed this down to me using GH CLI with git/ssh protocol. And when I do, this line REPO_URL=$(git config --get remote.origin.url) gives me git@github.com.....

I made a workaround for myself changing: REPO_URL=$(git config --get remote.origin.url)

to

REPO_URL_RAW=$(git config --get remote.origin.url)
REPO_URL=$(echo $REPO_URL_RAW | sed 's/git@/https:\/\//') # replace git@ to https://

A tiny bit tacky, but happy to make a PR with the change. I started with an issue, in case there are better ways of doing this with argocd and ssh/git protocol?

vfarcic commented 5 months ago

I think it depends on what you set up to be the default protocol when working with git. In my case the protocol is https while in yours it's git. Nevertheless, the changes you're proposing would be great. Please make a PR.

royveshovda commented 5 months ago

Yes, it depends on which protocol you use when configuring gh cli. I will test one more time and make a PR