Skip to content

gh gist edit <gist-url> command not working successfully with HTTP status code 422 #7630

@Petesta

Description

@Petesta

Describe the bug

A clear and concise description of what the bug is. Include version by typing gh --version.
When running gh --version I have the following output.

gh version 2.31.0 (2023-06-20)
https://github.com/cli/cli/releases/tag/v2.31.0

Steps to reproduce the behavior

  1. This occurs when running gh gist edit <gist-url> or gh gist edit <gist-url> --filename <filename>
  2. The output from the above command.
$> gh gist edit <gist-url>
HTTP 422: Invalid request. (https://api.github.com/gists/<gist-id>)

"public", "updated_at" are not permitted keys.
"language", "type" are not permitted keys.

Expected vs actual behavior

I expect this to work successfully when editing a gist. I recently installed gh yesterday and it was working successfully then too.

I've confirmed I have a valid access token and created a new one too. I can create gists from the command line with gh gist create <filename> and run other commands successfully.

$> gh gist create <filename>
- Creating gist <filename>
✓ Created secret gist <filename>
https://gist.github.com/<username>/<gist-url>

My value for EDITOR is vim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Affects a large population and inhibits workplatformProblems with the GitHub platform rather than the CLI client

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions