# Hugo can’t handle private modules

**URL:** <https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947>\
**Category:** support\
**Created:** [February 2, 2022, 11:32am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947 "2022-02-02T11:32:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lxsameer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lxsameer/32/16168_2.png) [@lxsameer](https://discourse.gohugo.io/u/lxsameer)\
**Post date:** [February 2, 2022, 11:32am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947/1 "2022-02-02T11:32:50Z")

</div>

I had no luck with the git config stuff. My question is why hugo wraps the `go get` stuff to begin with. I can do `go get` on my private module just fine but `hugo` can’t handle private modules at all

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 3, 2022, 1:05am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947/2 "2022-02-03T01:05:58Z")

</div>

Please provide some details:

1. Is there an error message, if so, what is the message?
2. Does this happen when you build the site locally?
3. Does this happen in a CI context (e.g., Netlify, building GitHub pages, etc.)?

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [February 3, 2022, 10:17am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947/3 "2022-02-03T10:17:46Z")

</div>

> [@lxsameer](#):
>
> My question is why hugo wraps the `go get` stuff to begin with.

Probably to make sure that you mount a Hugo module, not just a Go module. Yes, a Hugo module is a Go module. No, a Go module is not always a Hugo module. Without a proper error message and a module to test with we won’t be of much help here.

---

<div class="post-metadata">

**Author:** ![lxsameer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lxsameer/32/16168_2.png) [@lxsameer](https://discourse.gohugo.io/u/lxsameer)\
**Post date:** [February 3, 2022, 11:12am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947/4 "2022-02-03T11:12:27Z")

</div>

Thanks folks, I didn’t ask for help 🙂 I just use raw git to solve my problem (nothing related to go).  
My question was purely about hugo wrapping the `go get`.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 3, 2022, 11:28am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947/5 "2022-02-03T11:28:17Z")

</div>

> [@lxsameer](#):
>
> My question was purely about hugo wrapping the `go get` .

So we can:

- Set a custom environment (e.g. cache dir)
- Integrate it with the Hugo config (config.toml)
- Do vendoring of modules
- …

The list is long.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [February 5, 2022, 11:28am UTC](https://discourse.gohugo.io/t/hugo-can-t-handle-private-modules/36947/6 "2022-02-05T11:28:59Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
