Skip to content

GitHub Enterprise - Scan All Repos As Site Admin #24583

Answered by dy-lan
dy-lan asked this question in Enterprise
Discussion options

You must be logged in to vote

Just found https://help.github.com/en/enterprise/2.17/admin/installation/command-line-utilities#ghe-org-admin-promote, which can be used to promote a site admin to an owner of any org. To avoid sending other site admins an email for every org they are made an owner of, I did something like this to target only my user:

From admin shell:

for org in $(curl -u <user>:<token> https://<server>/api/v3/organizations \
| jq '.[].login' \
| cut -d '"' -f 2 \
| xargs echo); do ghe-org-admin-promote -u <user> -o $org -y; done

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enterprise Discussions related to GitHub Enterprise Cloud and Enterprise Server Product Feedback Enterprise Admin Topics specifically related to GitHub Enterprise administration
1 participant