§2023-04-15

¶ By ChatGPT

git remote set-url origin git@github.com:<username>/<repository>.git

Replace with your GitHub username and with the name of the repository you want to work with.

That's it! You should now be able to use Git with SSH authentication for your GitHub repositories. You can test this by running a command like git push or git pull and seeing if it works without prompting you for a password.

¶Setup to compile caddy

  1. Setup dir
$ mkdir caddy_compile && cd $_
$ git init
$  v
alexlai@hc4Jammy:~/build/caddy_compile$ git remote set-url origin git@github.com:alexlai@yushei.me/cloudflare.git

$ git remote set-url origin git@github.com:alexlai@yushei.me/caddy.git


$ xcaddy build --with github.com/caddy-dns/cloudflare --with github.com/caddyserver/format --with github.com/caddyserver/replace --with github.com/caddyserver/rewrite --with github.com/caddyserver/templates --with github.com/caddyserver/caddy-limits --with github.com/caddyserver/caddy-lua --with github.com/caddyserver/caddy-jwt --with github.com/mholt/caddy-webdav --with github.com/caddyserver/realip --with github.com/caddyserver/forwardproxy --with github.com/mholt/caddy-threads --with github.com/sjtug/caddy2-filter --with github.com/greenpau/caddy-auth-jwt --with github.com/greenpau/caddy-auth-portal --with github.com/greenpau/caddy-trace --with github.com/greenpau/caddy-authorize --with github.com/greenpau/caddy-cors --with github.com/caddyserver/markdown
I have to compile the caddy using "xcaddy --with github.com/caddyserver/format".  How to setup for example, "git remote set-url origin git@github.com:alexlai@yushei.me/xxx.git" ,  xxx.git please replace with the right one. So that it will use ssh method instead of http method to fetch source from github.