Closed Liturgist closed 1 year ago
Hello again @Liturgist.
Some thoughts:
I appreciate you trying to root out configuration issues by first using Reset-GitHubConfiguration
and Clear-GitHubAuthentication
to see if the issue still repro'd. Just to be clear though, it's expected that most users will likely never need to use those commands. Just wanted to make sure expectations were properly set that you shouldn't need to be using those commands normally.
To better understand the scope of the issue you're having, is Get-GitHubOrganizationMember
the only command that's currently failing in this scenario? In other words, can you successfully use (for instance) Get-GitHubRepository
and Get-GitHubUser
? Or was Get-GitHubOrganizationMember
just one example of how all of the commands are failing for you under a GitHub Enterprise configuration?
As I mentioned last time, I don't have access to a GitHub Enterprise system myself, so I don't have an easy way to diagnose this. I'm just going off the documentation that I can find online. Here's the core documentation I could find for GitHub Cloud. According to that:
All API access is over HTTPS, and accessed from
https://api.github.com
.
That guidance is consistent with the documentation for GitHub public acccess. Based on that, it sounds like you're not supposed to change the ApiHostName
at all.
So, based on all this, it sounds like using GitHub Enterprise Cloud should require no change in configuration from folks who are using regular GitHub.
I think the problem was that my PAT (Personal Access Token) had not been enabled for the repo.
I hope you are able to get access to an Enterprise account.
Issue Details
On a GitHub Enterprise Cloud account, Get-GitHubOrganizationMember is not working. It is working on a non-cloud GitHub Enterprise account.
I started by using
Clear-GitHubAuthentication
andReset-GitHubConfiguration
commands. Then,Set-GitHubAuthentication
andSet-GitHubConfiguration
were used.It appears not to find the URI.
StatusCode: 404, ReasonPhrase: 'Not Found'
Is this a correct URI to get members?
RequestUri: 'https://github.com/enterprises/XXX/api/v3/orgs/XXX-internal/members'
Steps to reproduce the issue
Verbose logs showing the problem
PS C:> Get-ComputerInfo -Property @(
OsName : Microsoft Windows 10 Enterprise OsOperatingSystemSKU : EnterpriseEdition OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406 OsLanguage : en-US OsMuiLanguages : {en-US}
PS C:> $PSVersionTable
Name Value
PSVersion 7.2.6 PSEdition Core GitCommitId 7.2.6 OS Microsoft Windows 10.0.19042 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
PS C:> @(