1

I am trying to list the files present on an enterprise GitHub repository. I tried using GitHub API but base URL for it is api.github.com where as base URL would be different for me and when I put that URL it says couldn't resolve. How can I achieve it for a URL in below format https://company.net/org/reponame

Below example works for me but the URL that I have it doesn't work curl -k https://api.github.com/user/repo?refs=master

aayan rade
  • 63
  • 5

1 Answers1

1

For an on-premise GitHub Enterprise, the documentation mentions

REST API endpoints — except Management Console API endpoints — are prefixed with the following URL:

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

In your case: https://company.net/api/v3

From there, using the Git Database API -- list tree, you can list all files, as illustrated here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250