Something went wrong. Try again.
forked from charmbracelet/soft-serve
Something went wrong. Try again.
1.4 kB 47 lines
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748# vi: set ft=conf
# start soft serveexec soft serve &# wait for SSH server to startensureserverrunning SSH_PORT
# create usersoft user create user1 --key "$USER1_AUTHORIZED_KEY"
# generate jwt tokensoft jwtstdout '.*\..*\..*'soft jwt repostdout '.*\..*\..*'usoft jwtstdout '.*\..*\..*'usoft jwt repostdout '.*\..*\..*'
# a token for a private repo the user cannot read and one for a missing# repo get the same answer, so the token cannot be used to probe names[windows] stopserver[windows] skip 'curl makes github actions hang'soft repo create secret -pusoft jwt secretcp stdout secretjwtenvfile SECRETJWT=secretjwtusoft jwt ghostcp stdout ghostjwtenvfile GHOSTJWT=ghostjwtcurl -H 'Authorization: Bearer '$SECRETJWT http://localhost:$HTTP_PORT/secret.git/info/refs?service=git-upload-packstdout '404.*'cp stdout want.txtcurl -H 'Authorization: Bearer '$GHOSTJWT http://localhost:$HTTP_PORT/ghost.git/info/refs?service=git-upload-packcmp stdout want.txt
# a token minted for another repo is bad credentials either waycurl -H 'Authorization: Bearer '$GHOSTJWT http://localhost:$HTTP_PORT/secret.git/info/refs?service=git-upload-packstdout '403.*'cp stdout want.txtcurl -H 'Authorization: Bearer '$SECRETJWT http://localhost:$HTTP_PORT/ghost.git/info/refs?service=git-upload-packcmp stdout want.txt
# stop the server[windows] stopserver[windows] ! stderr .