wiki:github_cli_commands
Table of Contents
Github cli commands
Add team to repo
Login to github first:
gh auth login ? What account do you want to log into? GitHub.com ? What is your preferred protocol for Git operations on this host? SSH ? Upload your SSH public key to your GitHub account? Skip ? How would you like to authenticate GitHub CLI? Login with a web browser ! First copy your one-time code: B095-850C Press Enter to open github.com in your browser... Gtk-Message: 16:54:29.259: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it. [251062, Main Thread] WARNING: GTK+ module /snap/firefox/3728/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187 (firefox:251062): Gtk-WARNING **: 16:54:29.311: GTK+ module /snap/firefox/3728/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: 16:54:29.311: Failed to load module "canberra-gtk-module" [251062, Main Thread] WARNING: GTK+ module /snap/firefox/3728/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187 (firefox:251062): Gtk-WARNING **: 16:54:29.312: GTK+ module /snap/firefox/3728/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: 16:54:29.312: Failed to load module "canberra-gtk-module" ✓ Authentication complete. - gh config set -h github.com git_protocol ssh ✓ Configured git protocol ✓ Logged in as myuser
Then run (example with maintain permissions):
gh api --method PUT -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/Yourorganization/teams/TeamDevelopment/repos/Yourorganization/myrepo -f permission='maintain'
Tested on
- gh version 2.43.1 (2024-01-31)
See also
References
wiki/github_cli_commands.txt · Last modified: 2024/02/12 10:22 by antisa