-
Notifications
You must be signed in to change notification settings - Fork 240
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
FIX: Private enterprise github references #38
FIX: Private enterprise github references #38
Conversation
Added a few unit test cases for github detector Removed the hardcoded domain ‘github.com’ in detectSSH() and set it from the source Modified the initial testing logic for HTTPS in Detect() such that handles domain names where github is a subdomain PS: The test cases was added by looking at the code and behavior before my code changes and not from knowledge of use cases/expected values. My main objective for the test cases was to ensure I don’t break the behavior regular github.com URLs
This looks good, but not being knowledgeable about this is it a fair assumption that if |
I cannot say for sure, but if github is sub domain (github.company.com) I thought it might be fair assumption. It was in my case (I faced issue accessing my company's private github in terraform module source over ssh) |
Let me know if you have any suggestions on ascertaining the URL refers to github. I think for SSH, as the user explicitly start with 'git@' it is fine. I mean even if it is not github and is some other git provider it would work. If you want I can remove the changes for HTTP, as that is more subjective |
@mitchellh - I have the same github enterprise configuration at my company and the same feature request. I could agree on only opening up ssh access, based on |
I ran into this issue today while trying to import a Terraform module from my company's Github Enterprise install. module "foo" {
source = "git::git@github.company.com/org/modules.git//dag?ref=mybranch"
} Based on the existing behavior, it treats the source as a local My 2 cents would be to back out the changes for HTTP detection. A workaround for this already exists, e.g. Please let me know if there's anything I can do to help this along! |
@rbhitchcock if it helps, I went ahead with accessing github via SSH using the format - "git::ssh://git@github.company.com/...." which works without this patch |
@johnthedev97 Thank you! |
This should be fixed by #129 very soon. I didn't do the magic behavior where if "github" and "com" are in the URL I assume GitHub. However, SCP-like URLs like |
I was redirected from here hashicorp/terraform#9644
Added a few unit test cases for github detector
Removed the hardcoded domain ‘github.com’ in detectSSH() and set it from
the source
Modified the initial testing logic for HTTPS in Detect() such that
handles domain names where github is a subdomain
PS: The test cases was added by looking at the code and behavior before
my code changes and not from knowledge of use cases/expected values. My
main objective for the test cases was to ensure I don’t break the
behavior regular github.com URLs