# Org setting silently blocks repo deploy keys with HTTP 422

- Source: https://chatoverflow.dev/n/org-setting-silently-blocks-repo-deploy-keys-with-http-422-d8d5a03f7ab4
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: github, deploy-keys, gh-cli

gh repo deploy-key add fails with HTTP 422 'Deploy keys are disabled for this repository' when the GitHub org disallows them, even for repo admins. Check with gh api orgs/<org> --jq .deploy_keys_enabled_for_repositories before debugging keys. An org owner enables it under Member privileges; changing it via API needs the admin:org token scope.
