Questions tagged [github-cli]

The Github CLI ("gh") is a tool for interacting with your repositories on Github straight from the command line.

gh is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts to the terminal.

Useful links:

184 questions
0
votes
1 answer

How to list all issues of a github repository with all assignees

I use gh command to list and print all issues to a CSV file, but I can't get the all assignees also. The complete command I use: gh issue list --limit 1000 --state all | tr '\t' ',' > issues.csv
acun
  • 57
  • 4
0
votes
0 answers

cannot ssh into my github codespaces using github cli

whenever I try to access my codespace using ssh like this: gh codespaces ssh then select a codespace. I'm always getting this error: Load key "~/.ssh/id_rsa": Permission denied and then prompt for a password which isn't anything I have set. the…
ntriisii
  • 25
  • 4
0
votes
0 answers

GitHub CLI from GitHub Actions workflow

According to GitHub Docs, one can use GitHub CLI commands in a workflow. I am trying to programmatically update the description of the repository from a workflow in that repository, and the only solution I found was using the GitHub CLI: name:…
Qunatized
  • 197
  • 1
  • 9
0
votes
0 answers

Command gh issue list to export issues to CSV file

this command gh issue list --limit 10000 --state all --json number,title,assignees,state,labels,url |^ jq -r '["number","title","assignees","state","labels","url"],^ (.[] | [.number, .title,^ (.assignees | if length==0 then…
Roberto
  • 11
  • 1
0
votes
1 answer

gh release create -R error Invalid target_commitish parameter

When trying to run gh release create v0.0.1 -R https://github.com/path/to/repo I get a an error as below. HTTP 400: Invalid target_commitish parameter (https://api.github.com/repos/path/to/repo/releases/generate-notes) The target repo is private.
sam
  • 1,005
  • 1
  • 11
  • 24
0
votes
1 answer

How to get gh api command to ignore errors so it does not drop out of loops?

I am trying to run in a loop some gh api GET commands (Github cli), but it stops once it hits any error (e.g., the url not found or whatever it was filtered on and looking for was not found). I would rather capture the stderr and do something based…
archcutbank
  • 419
  • 1
  • 6
  • 17
0
votes
0 answers

Connectivity issue while creating a release with GitHub CLI

GHA workflow step: - name: create release run: | gh release create v1.0.0 --repo myrepoowner/myrepositoryname/Release --title "My Release" --notes "This is the first version of my project." env: GITHUB_TOKEN: ${{ secrets.PAT…
0
votes
0 answers

Manage config of my github repos with the GithubCLI from a Girhub Actions Workflow

I try to manage my Github Repo Settings from a Github Actions workflow to ensure there are no unwanted changes and everything is consistent across lots of repos (I want to use the same workflow for all repos). I want to disable the wiki and some…
0
votes
1 answer

Fetching json content from a git diff command result

Git diff tag1.2 tag1.5 Output for the above command is **Tag Some character @@262728 { 'Code-version':'1.5', 'changes':[ 'code-repo':'2.1'] } **Tag Some character @@262728 { 'Code-version':'1.4', 'changes':[ 'code-repo':'2.0'] } **Tag Some…
0
votes
0 answers

How can a remote file URL be shown from command line in a local clone?

I have a local clone of the PowerShellForGitHub project. I can get the project URL using the command: PS C:\src\PowerShellForGitHub> git remote get-url origin https://github.com/microsoft/PowerShellForGitHub.git There is a file in the project named…
lit
  • 14,456
  • 10
  • 65
  • 119
0
votes
1 answer

Github CLI (gh) Get PR Info After Merge or Push to Branch

After a pull request is merged to a branch, how can I obtain the details/info about that newly-merged PR (the PR number, message, merge time, etc.) using the Github CLI?
mmarion
  • 859
  • 8
  • 20
0
votes
1 answer

Git fetch not fetching from upstream

I have cloned a fork repo using GitHub CLI gh: gh repo clone felipeplets/Auto-GPT In order to check out an upstream branch locally I then ran: git fetch --all git switch -c stable upstream/stable I received the message error message, although I…
Felipe Plets
  • 7,230
  • 3
  • 36
  • 60
0
votes
0 answers

GitHub CLI search repos does not recognize existing repo

Using gh search reports that there is a test003 repo. Why does it report that the test003 repo does not exist in the second command? PS C:\> gh search repos 'user:Liturgist' Showing 2 of 2 repositories NAME DESCRIPTION VISIBILITY …
lit
  • 14,456
  • 10
  • 65
  • 119
0
votes
0 answers

Netlify error on build image Xenial Xerus deprecated

Build image deploy error [Disclaimer: I'm a beginner on deployment of apps] Hi there, I tried to deploy my web page (Nextjs) on Netlify and I'm getting a weird error on github CLI. When I see the logs of failed CLI tests it says: " UNSUPPORTED BUILD…
0
votes
0 answers

Why do I need to prepend GitHub repos with my username, and how do I fix it?

Whenever I want to clone a private repository from GitHub, I can't simply copy the GitHub CLI command. gh repo clone foo/bar Instead, I need to prepend it with my username @github.com so that it becomes: gh repo clone…