that's what we do - forking https://github.com/golang/gddo and adding the custom authentication logic and fetching data from the GHE.
I'd recommend to concentrate on building and customizing gddo-server and gosrc (don't try to build everything in gddo). We changed or added the following files: * gddo-server/main.go - proto defaults to https (for https://github.com/golang/gddo/blob/master/gddo-server/main.go#L337) - added a new command-line option tlsdir = flag.String("tlsdir", "/custom/tls/path", "directory with TLS key/certificate") - at the end of main(), instead of appengine.Main(), put the custom authentication and http.ListenAndServeTLS with the authentication * gosrc/newfile.go - implements fetching code from the internal Git instance addService(&service{ pattern: regexp.MustCompile(`^go\.corp\.company\.com/(?P<owner>[a-z0-9A-Z_.\-]+)/(?P<repo>[a-z0-9A-Z_.\-]+)(?P<dir>/.*)?$`), prefix: "go.corp.company.com", // custom package prefix get: getCustomGitDir, getPresentation: getCustomGitPresentation, getProject: getCustomGitProject, }) and then implementation of the three getCustomGit* functions * httputil/transport.go - adds patch for authentication GHE instance if req.URL.Host == "git.corp.company.com" { // get token, add it to the [copy of the] request I think that's mostly it. I wish someone would take time to make and opensource a fork of gddo that would be free from the GHE/appenging stuff which complicates the matters somewhat when you have to host it on your own :) On Tuesday, October 25, 2016 at 5:46:40 PM UTC+2, Jonathan Yu wrote: > > It looks like the source code for godoc.org is available, but there's not > a whole lot of instructions on use (my guess is they don't intend for it to > be used in your intranet): https://github.com/golang/gddo > > That means you'll need to roll up your sleeves and dig into the code, > probably modifying it to handle authentication with your GitHub Enterprise > installation, etc. There's instructions on running it here: > https://github.com/golang/gddo/wiki/Development-Environment-Setup > > If you do go this route, consider contributing your work back into the > project itself :) > > On Tue, Oct 25, 2016 at 7:57 AM, Kareem Gan <kare...@gmail.com > <javascript:>> wrote: > >> Ah. But I need it to download the repositories from my organizations >> enterprise github server through. >> On Tue, Oct 25, 2016 at 09:55 Pietro Gagliardi <and...@lostsig.net >> <javascript:>> wrote: >> >>> Is imitating golang.org not sufficient? It will still show you all the >>> packages in your $GOPATH in the Packages page: >>> >>> http://imgur.com/EGpqWsR >>> >>> On Oct 25, 2016, at 10:36 AM, Kareem Gan <kare...@gmail.com >>> <javascript:>> wrote: >>> >>> So it's not possible? It would be really helpful if someone here has >>> done it already and share the knowledge how. >>> >>> On Thursday, October 20, 2016 at 12:35:10 PM UTC-5, Pietro Gagliardi >>> (andlabs) wrote: >>>> >>>> You can go get golang.org/x/tools/cmd/godoc and run the godoc tool >>>> itself, which will imitate golang.org. This is different from godoc.org; >>>> that is harder to host locally. >>>> >>>> On Oct 20, 2016, at 1:13 PM, Kareem Gan <kare...@gmail.com> wrote: >>>> >>>> Hello. >>>> >>>> Is it possible to host godoc internally because we have our own git >>>> server and would like to host godoc internally so we can build >>>> documentation for our golang repositories. >>>> -- >>>> Best, >>>> >>>> Kareem Gan >>>> 01010011 01000101 >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "golang-nuts" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to golang-nuts...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golang-nuts...@googlegroups.com <javascript:>. >>> >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >> Best, >> >> Kareem Gan >> 01010011 01000101 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jonathan Yu / *@jawnsy* on LinkedIn <https://linkedin.com/in/jawnsy>, > Twitter <https://twitter.com/jawnsy>, GitHub <https://github.com/jawnsy>, > Facebook <https://facebook.com/jawnsy> > *“Ever tried. Ever failed. No matter. Try again. Fail again. Fail better.”* — > Samuel Beckett, Worstward Ho (1983) > > “In an adaptive environment, winning comes from adapting to change by > continuously experimenting and identifying new options more quickly and > economically than others. The classical strategist's mantra of sustainable > competitive advantage becomes one of serial temporary advantage.” — > Navigating > the Dozens of Different Strategy Options > <https://hbr.org/2015/06/navigating-the-dozens-of-different-strategy-options> > (HBR) > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.