Skip to content

[BUG]: 6.11.0 - 422 This organization does not allow private repository forking #3173

Closed

Description

@andriess

Expected Behavior

Expect the description to be updated, and not fail on altering the forking settings.

The allow_forking setting is not used in the resource config (as was the fix in #3159).

Actual Behavior

Correctly identifies the change:

Terraform will perform the following actions:
  # github_repository.repositories will be updated in-place
  ~ resource "github_repository" "repositories" {
      + description                             = "test"
        id                                      = "andries-playground2"
        name                                    = "andries-playground2"
        # (40 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }
Plan: 0 to add, 1 to change, 0 to destroy.

But apply fails with 422 This organization does not allow private repository forking []

<--- snip --->

Initializing provider plugins...
- Finding hashicorp/vault versions matching "~> 5.7.0"...
- Finding integrations/github versions matching "~> 6.11.0"...
- Installing integrations/github v6.11.0...
- Installed integrations/github v6.11.0 (signed by a HashiCorp partner, key ID 38027F80D7FD5FB2)
- Installing hashicorp/vault v5.7.0...
- Installed hashicorp/vault v5.7.0 (signed by HashiCorp)

<--- snip --->

github_repository.repositories: Modifying... [id=andries-playground2]
Error: PATCH https://api.github.com/repos/ORG/andries-playground2: 422 This organization does not allow private repository forking []
  with github_repository.repositories,
  on main.tf line 1, in resource "github_repository" "repositories":
   1: resource "github_repository" "repositories" {
error occurred:

* Failed to execute "terraform apply -auto-approve -no-color" in /home/runner/_work/github-tf/github-tf/live/repositories/andries-playground2/.terragrunt-cache/piEiUGoF_K7yxAT9AB-JDNUX67U/lj5I5nBRe8jKltySjc3PLMqv_nY/repository

  Error: PATCH https://api.github.com/repos/ORG/andries-playground2: 422 This organization does not allow private repository forking []

    with github_repository.repositories,
    on main.tf line 1, in resource "github_repository" "repositories":
     1: resource "github_repository" "repositories" {


  exit status 1

Terraform Version

terraform v1.13.5
on linux_amd64
provider registry.

Affected Resource(s)

  • github_repository

Terraform Configuration Files

resource "github_repository" "repositories" {
  name                        = var.name
  description                 = var.description
  topics                      = var.topics
  allow_auto_merge            = var.allow_auto_merge
  allow_merge_commit          = var.allow_merge_commit
  allow_rebase_merge          = var.allow_rebase_merge
  allow_squash_merge          = var.allow_squash_merge
  allow_update_branch         = var.allow_update_branch
  has_issues                  = var.has_issues
  has_projects                = var.has_projects
  has_wiki                    = var.has_wiki
  vulnerability_alerts        = var.vulnerability_alerts
  delete_branch_on_merge      = var.delete_branch_on_merge
  is_template                 = var.is_template
  homepage_url                = var.homepage_url
  squash_merge_commit_message = var.squash_merge_commit_message
  squash_merge_commit_title   = var.squash_merge_commit_title
  merge_commit_message        = var.merge_commit_message
  merge_commit_title          = var.merge_commit_title
  visibility                  = "private"
  auto_init                   = false
  has_discussions             = false
  web_commit_signoff_required = false
}

Steps to Reproduce

No response

Debug Output

Panic Output

{
      "mode": "managed",
      "type": "github_repository",
      "name": "repositories",
      "provider": "provider[\"registry.terraform.io/integrations/github\"]",
      "instances": [
        {
          "schema_version": 1,
          "attributes": {
            "allow_auto_merge": false,
            "allow_forking": false,
            "allow_merge_commit": true,
            "allow_rebase_merge": true,
            "allow_squash_merge": true,
            "allow_update_branch": true,
            "archive_on_destroy": null,
            "archived": false,
            "auto_init": false,
            "default_branch": "main",
            "delete_branch_on_merge": true,
            "description": "",
            "etag": "there_was_an_etag_here",
            "fork": "false",
            "full_name": "ORG/andries-playground2",
            "git_clone_url": "git://github.com/ORG/andries-playground2.git",
            "gitignore_template": null,
            "has_discussions": false,
            "has_downloads": false,
            "has_issues": true,
            "has_projects": true,
            "has_wiki": true,
            "homepage_url": "",
            "html_url": "https://github.com/ORG/andries-playground2",
            "http_clone_url": "https://github.com/ORG/andries-playground2.git",
            "id": "andries-playground2",
            "ignore_vulnerability_alerts_during_read": false,
            "is_template": false,
            "license_template": null,
            "merge_commit_message": "PR_TITLE",
            "merge_commit_title": "MERGE_MESSAGE",
            "name": "andries-playground2",
            "node_id": "there_was_some_node_id_here",
            "pages": [],
            "primary_language": "",
            "private": true,
            "repo_id": "there_was_some_repo_id_here",
            "security_and_analysis": [
              {
                "advanced_security": [
                  {
                    "status": "disabled"
                  }
                ],
                "code_security": [],
                "secret_scanning": [
                  {
                    "status": "disabled"
                  }
                ],
                "secret_scanning_ai_detection": [],
                "secret_scanning_non_provider_patterns": [],
                "secret_scanning_push_protection": [
                  {
                    "status": "disabled"
                  }
                ]
              }
            ],
            "source_owner": "",
            "source_repo": "",
            "squash_merge_commit_message": "COMMIT_MESSAGES",
            "squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
            "ssh_clone_url": "[email protected]:ORG/andries-playground2.git",
            "svn_url": "https://github.com/ORG/andries-playground2",
            "template": [],
            "topics": [],
            "visibility": "private",
            "vulnerability_alerts": true,
            "web_commit_signoff_required": false
          },
          "sensitive_attributes": [],
          "identity_schema_version": 0,
          "private": "there_was_something_private_here"
        }
      ]
    },

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Bug
    Status: Triage
    on Feb 9, 2026
  2. github-actions commented on Feb 9, 2026

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  3. andriess commented on Feb 9, 2026

    @andriess
    Author

    The example repo was newly created, before trying to apply above change. The apply output:

    Initializing the backend...
    Successfully configured the backend "gcs"! Terraform will automatically
    use this backend unless the backend configuration changes.
    Initializing provider plugins...
    - Finding hashicorp/vault versions matching "~> 5.7.0"...
    - Finding integrations/github versions matching "~> 6.11.0"...
    - Installing hashicorp/vault v5.7.0...
    - Installed hashicorp/vault v5.7.0 (signed by HashiCorp)
    - Installing integrations/github v6.11.0...
    - Installed integrations/github v6.11.0 (signed by a HashiCorp partner, key ID 38027F80D7FD5FB2)
    
    <-- snip -->
    
    Terraform used the selected providers to generate the following execution
    plan. Resource actions are indicated with the following symbols:
      + create
    Terraform will perform the following actions:
      # github_repository.repositories will be created
      + resource "github_repository" "repositories" {
          + allow_auto_merge                        = false
          + allow_forking                           = (known after apply)
          + allow_merge_commit                      = true
          + allow_rebase_merge                      = true
          + allow_squash_merge                      = true
          + allow_update_branch                     = true
          + archived                                = false
          + auto_init                               = false
          + default_branch                          = (known after apply)
          + delete_branch_on_merge                  = true
          + etag                                    = (known after apply)
          + fork                                    = (known after apply)
          + full_name                               = (known after apply)
          + git_clone_url                           = (known after apply)
          + has_discussions                         = false
          + has_issues                              = true
          + has_projects                            = true
          + has_wiki                                = true
          + html_url                                = (known after apply)
          + http_clone_url                          = (known after apply)
          + id                                      = (known after apply)
          + ignore_vulnerability_alerts_during_read = false
          + is_template                             = false
          + merge_commit_message                    = "PR_TITLE"
          + merge_commit_title                      = "MERGE_MESSAGE"
          + name                                    = "andries-playground2"
          + node_id                                 = (known after apply)
          + primary_language                        = (known after apply)
          + private                                 = (known after apply)
          + repo_id                                 = (known after apply)
          + source_owner                            = (known after apply)
          + source_repo                             = (known after apply)
          + squash_merge_commit_message             = "COMMIT_MESSAGES"
          + squash_merge_commit_title               = "COMMIT_OR_PR_TITLE"
          + ssh_clone_url                           = (known after apply)
          + svn_url                                 = (known after apply)
          + topics                                  = (known after apply)
          + visibility                              = "private"
          + vulnerability_alerts                    = true
          + web_commit_signoff_required             = false
            # (1 unchanged attribute hidden)
          + security_and_analysis (known after apply)
        }
    

    Forking is disabled on a organisation level.

  4. removed
    Status: Triage
    on Feb 9, 2026
  5. added this to the v6.11.1 Patch milestone on Feb 9, 2026
  6. calebworks commented on Feb 10, 2026

    @calebworks

    @stevehipwell do you know roughly when 6.11.1 Patch might be released?

  7. deiga commented on Feb 11, 2026

    @deiga
    Collaborator

    @stevehipwell do you know roughly when 6.11.1 Patch might be released?

    We're trying to get it out ASAP within the next few days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions