title: Golang Private Modules (v1.17) -- package found but does not contain the package
body: <p>Reviewing numerous articles, running into this issue:</p>
  <ol>
  <li><p>Created a private package, 'mypackage' in my git account</p>
  </li>
  <li><p>In git, I have MyCompany/mypackage</p>
  </li>
  <li><p>In another project, I want to import the package:</p>
  <pre class="lang-golang prettyprint-override"><code>...
  import (
     &quot;github.com/MyCompany/mypackage'
  )
  </code></pre>
  </li>
  <li><p>When I run:</p>
  <pre><code>go mod tidy
  </code></pre>
  </li>
  </ol>
  <p>I get the following error:</p>
  <p>github.com/MyCompany/mypackage: module github.com/MyCompany/mypackage@latest found (v0.0.0-20220126203606-a88fea44b771), but does not contain package github.com/MyCompany/mypackage</p>
  <p>Not sure how to resolve this.</p>
  <p>In my .gitconfig I have:</p>
  <pre><code>[url &quot;ssh://git@github.com/&quot;]
      insteadOf = https://github.com/
  </code></pre>
  
  <pre><code>go env 
  </code></pre>
  <p>shows these settings:</p>
  <pre><code>GOPRIVATE=&quot;github.com/MyCompany/*&quot;
  GONOPROXY=&quot;github.com/MyCompany/*&quot;
  GONOSUMDB=&quot;github.com/MyCompany/*&quot;
  </code></pre>
  <p>What other configurations am I missing?</p>
  <p>The go.mod file looks like:</p>
  <pre><code>module github.com/MyCompany/mypackage
  
  go 1.17
  
  require (
      github.com/go-redis/redis/v8 v8.11.4
      github.com/pkg/errors v0.9.1
  )
  
  require (
      github.com/cespare/xxhash/v2 v2.1.2 // indirect
      github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
  )
  </code></pre>