Based on your info provide,
- Your GitHub instance is hosted at a URL like
https://<company>.ghe.com. - You're using GitHub Enterprise Cloud with custom domain URL (
ghe.com).
The GitHub connection type does not support GitHub Cloud tenants with custom domains, even though the backend is GitHub Enterprise Cloud.
So, despite being a GitHub Enterprise Cloud instance, your ghe.com-based tenant requires you to use the GitHub Enterprise Server connection type because of the custom domain.
When creating the service connection:
- Select GitHub Enterprise Server
- Enter your custom domain:
https://<company>.ghe.com - Use a classic PAT with the correct scopes: repo, admin:repo_hook, workflow, read:org, user
- Ensure:
- The PAT is SSO-authorized
- Your organization does not restrict PAT usage
- The token has not expired or been revoked
In Azure DevOps:
- Go to Project Settings -> Service Connections -> GitHub Enterprise Server connection -> Click Manage roles or Security -> Ensure it is authorized for all pipelines or specifically the target pipeline and approve the key if prompted
In your GitHub repository (hosted at *.ghe.com):
- Navigate to Settings > Webhooks and Confirm:
- Azure DevOps webhook is registered
- Events like
pull_request,pushare enabled
Hope this helps!
Please Let me know if you have any queries.