Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for on-premise enterprise github #293

Closed
gislikonrad opened this issue Sep 19, 2023 · 4 comments · Fixed by #296
Closed

Add support for on-premise enterprise github #293

gislikonrad opened this issue Sep 19, 2023 · 4 comments · Fixed by #296
Labels
enhancement New feature or request

Comments

@gislikonrad
Copy link

An option should be added to apigeecli apis create github to supply an alternative to https://www.github.com as the base url. This would help those of us who are running GitHub enterprise on-premise.

Example
apigeecli apis create github -n helloworld -u sandbox -r helloworld-proxy -p proxies/helloworld/apiproxy -b https://my.github.local

@srinandan srinandan added the enhancement New feature or request label Sep 19, 2023
srinandan added a commit that referenced this issue Sep 19, 2023
@srinandan srinandan linked a pull request Sep 19, 2023 that will close this issue
ssvaidyanathan added a commit that referenced this issue Sep 19, 2023
feat: add support for on-prem GH #293
@ssvaidyanathan
Copy link
Collaborator

@gislikonrad - we just released a beta version
Can you try installing that and see if the support for on-prem GitHub works?

export APIGEECLI_VERSION=v1.124.0-beta
curl -L https://raw.githubusercontent.com/apigee/apigeecli/main/downloadLatest.sh | sh -

@gislikonrad
Copy link
Author

gislikonrad commented Sep 21, 2023

apigeecli -v
apigeecli version 1.124.0-beta date: 2023-09-20T19:06:10Z [commit: 0ef1ca9]

apigeecli apis create github -g https://git.internal -u infrastructure -r apigee-cloud -p proxies/coffee/apiproxy -n coffee -o sandbox
Error: unknown shorthand flag: 'g' in -g
Usage:
apigeecli apis create github [flags]

Aliases:
github, gh

Flags:
-h, --help help for github
-n, --name string API Proxy name
-u, --owner string The github organization or username. ex: In https://github.com/apigee, apigee is the owner name
-p, --proxy-path string The path in the repo to the apiproxy folder. ex: sample-proxies/apikey/apiproxy
-r, --repo string The github repo name. ex: https://github.com/apigee/api-platform-samples, api-platform-samples is the repo

Global Flags:
-a, --account string Path Service Account private key in JSON
--disable-check Disable check for newer versions
--metadata-token Metadata OAuth2 access token
--no-output Disable printing all statements to stdout
-o, --org string Apigee organization name
--print-output Control printing of info log statements (default true)
-t, --token string Google OAuth Token

@ssvaidyanathan
Copy link
Collaborator

@gislikonrad - you need to set that as preference
Please check this

@gislikonrad
Copy link
Author

gislikonrad commented Sep 22, 2023

So, I didn't realize that the apigeecli just used http to get the repo. I assumed that it used a preinstalled git client and the associated configuration. GitHub enterprise on-premise requires authentication, even for public repositories. So attempting to use the github feature with on-premise github fails with a 406 status code that attempts to redirect you to a login page.

Also, when performing apigeecli prefs set -g <url>, it overwrites clears the organization preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants