Skip to content

Fix api url for Github Enterprise #117

@v2kiran

Description

@v2kiran

The api url has been coded in the following format:

$url = "https://api.$hostName/$UriFragment"

While this works for github it fails with the enterprise version because the api url is different:

http(s)://[hostname]/api/v3

As a result when you call any of the function referencing Github enterprise you may get the following error:

The remote name could not be resolved: 'api.myghhost.com'
At C:\Program 
Files\WindowsPowerShell\Modules\PowerShellForGitHub\0.8.0\GitHubCore.ps1:520 
char:9
+         throw $newLineOutput
+         ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (The remote name.... 
   com':String) [], RuntimeException
    + FullyQualifiedErrorId : The remote name could not be resolved: 'api.myghhost.com'

Will raise a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions