I am setting up the GitHub repo branch policies via Terraform. While running the terraform script using the Azure DevOps, I am getting this error message.
2024-08-12T13:23:31.547Z [DEBUG] provider.terraform-provider-github_v5.45.0: -----------------------------------------------------
2024-08-12T13:23:31.587Z [DEBUG] provider.terraform-provider-github_v5.45.0: 2024/08/12 13:23:31 [DEBUG] Rate limit 0 reached, sleeping for 41m48.413031217s (until 2024-08-12 14:05:20.0000009 +0000 UTC m=+2508.969551110) before retrying
I can see that when it is not working the request to GitHub API as anonymized:
{
"login": "NorthOilCompany",
"id": 79192076,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc5MTkyMDc2",
"url": "https://api.github.com/orgs/NorthOilCompany",
"repos_url": "https://api.github.com/orgs/NorthOilCompany/repos",
"events_url": "https://api.github.com/orgs/NorthOilCompany/events",
"hooks_url": "https://api.github.com/orgs/NorthOilCompany/hooks",
"issues_url": "https://api.github.com/orgs/NorthOilCompany/issues",
"members_url": "https://api.github.com/orgs/NorthOilCompany/members{/member}",
"public_members_url": "https://api.github.com/orgs/NorthOilCompany/public_members{/member}",
"avatar_url": "https://avatars.githubusercontent.com/u/79192076?v=4",
"description": "",
"name": "North Oil Company",
"company": null,
"blog": "noc.qa",
"location": "Qatar",
"email": null,
"twitter_username": "NorthOilCompany",
"is_verified": false,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 0,
"public_gists": 0,
"followers": 4,
"following": 0,
"html_url": "https://github.com/NorthOilCompany",
"created_at": "2021-02-17T08:15:16Z",
"updated_at": "2021-04-29T21:05:50Z",
"archived_at": null,
"type": "Organization"
}
I have contacted GitHub, and they are saying that when the request gets anonymized then the limit is very low. They can’t do much on their end when the request itself has some issue.
That problem is happening before it reaches GitHub. They don’t know why authentication is being stripped, just that it’s anonymous when GitHub receives it.
Yesterday I reproduced the same issue on directly accessing the VM hosted on the Azure (self-hosted agent) where I was encountering the issue.
Logs can be found here:
GH_Log_20240813_qcazvm-ado-01(not-working).txt
But when running the same Terraform code,
This limitation of API is not observed in another terminal server which is on-premises server. Same code and operations but different environment.
Attach is the logs that I executed and working from on-premises.
GH_Log_20240814_QAMV3-SWTS129(working).log
Can you please help me investigate why am I getting this issue?
Let me know if I need to provide some more information from my side to resolve this issue.
Thanks in advance!
BR/Kashan