loading...

re: Get a list of all of your GitHub repositories VIEW POST

FULL DISCUSSION
 

Had to do some simple edits for terminal execution (and add /users/ to the URL):

[[ $1 = "" ]] &&
echo Error: missing username argument. ||
curl --silent "https://api.github.com/users/$1/repos?page=1&per_page=100" |
npx jq '.[].ssh_url' |
while read repo
do
    repo="${repo%\"}"
    repo="${repo#\"}"
    echo "$repo"
done | sort

Also omitted the username password request, but that's for generally faster usage. :)

Thanks for sharing!

Code of Conduct Report abuse