215 questions
-4
votes
1
answer
128
views
How can I list all branches from every repository in a GitHub account using GitHub CLI? [closed]
I'm using GitHub CLI and PowerShell, and I want to list all branches from every repository under a specific GitHub username.
gh repo list only returns the repo names, but I want a way to loop through ...
2
votes
0
answers
291
views
Get `gh pr list` to output all fields as JSON
I would like to get the Github CLI to give me JSON output including all JSON fields (I find it easier to see what's available and useful by quickly checking example output rather than deciphering ...
3
votes
1
answer
349
views
GitHub Personal Access Token returns 401 "Bad credentials" but CLI works perfectly - What's the difference?
Problem Summary
All Personal Access Tokens return 401 Bad credentials when using curl or direct API calls, but GitHub CLI authentication works perfectly. This affects ALL tokens including newly ...
0
votes
1
answer
152
views
GitHub CLI says "current directory is not a git repository" even after running `git init`
I have done the following:
Create a folder called "TestGitHubCliRepo".
Create a file named "README.md" inside the folder.
Go to the folder in terminal.
Run git init.
Run gh repo ...
0
votes
0
answers
69
views
how to allow GitHub_cli different permissions in different organizations
I have owner rights on different GitHub organizations and admin rights on a lot of the repositories in these organizations.
I am now working on a script that can create and delete repos using gh. So I ...
-1
votes
2
answers
137
views
Why gh cli create master branch instead of the main branch? [closed]
I was using gh cli to create a new repository and clone immediately to use using the gh repo create <reponame> --public --clone and involuntarily I pushed on the main branch and realized that gh ...
0
votes
0
answers
133
views
How to retrieve Project custom properties or field values in Octokit.GraphQL.Net
We have a github project with custom field such as Sprint and story points.
Below is the sample query that I am trying using Octokit.GraphQL.Net
var query = new Query()
.Repository("my-repo",...
1
vote
1
answer
604
views
Download artifacts from a different GitHub repo with gh cli
Looking at this documentation I can use curl version of the provided example:
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer GITHUB_CODE" -H "X-...
0
votes
1
answer
258
views
Github API graphQL - Get certain organization user organizationVerifiedDomainEmails
I am the admin of my github organization. I want to get organization member emails from their username. I have the following gh cli command that will give me all members, but I want a specific member.
...
0
votes
0
answers
31
views
VSCode port forwarding through powershell or batch
I have a project in visual studio code, but has to port forwarded through the Ports tab's port forwarding feature. I am trying to make a powershell/batch script to automate the awkwardly long process ...
0
votes
1
answer
187
views
How can I store the output of a jq process to a github cli environment variable
I have a jq process that looks at the values of a JSON file, checks a few things, and then determines if the current object is available to perform something against. The problem I have right now is ...
-1
votes
1
answer
329
views
Unable to edit and capture Super Linter error into GitHub Issue
I am using Superlinter actions in GitHub Actions for code linting. I would like to trigger action once issue is created, and capture error that is raised by SQLFluff (Linter in SuperLiner) into the ...
0
votes
2
answers
383
views
How to auto close GitHub issue using GitHub CLI in GitHub Actions
I would like to automatically close the issue once it is created. For this I referred to Actions marketplace and this action. Currently my code in YAML file looks like below. GitHub token is saved in ...
1
vote
1
answer
106
views
remote: Repository not found while using GitHub CLI
I recently started using the GitHub CLI to manage multiple GitHub accounts on the same device. However, I've been unable to push code to a repository I was added to. I've checked, and the account I'm ...
-1
votes
1
answer
47
views
Branch still pushing from old account
I needed to switch github accounts to push something to a company github account. I tried to change to my new username but constantly get rejected.
remote: Permission to Company/project.git denied ...