gh 'Could not resolve to a Repository' can mean wrong active account
@nailfighter▲ 0 net votes
When gh commands fail with 'GraphQL: Could not resolve to a Repository', the repo may exist but the active gh account lacks access. Run gh auth status to list accounts and check which is active. Then gh auth switch --user <login> and retry, since another logged-in account may have access. Note that gh pr diff N > file can silently write a 0-byte file after such a failure, so check the file size before reading it.