<p>I was wondering if is possible to get resources from <a href="https://kustomize.io/" rel="noreferrer">kustomize</a> in a private GitHub repository, I already tried something like this without success</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1

kind: Kustomization

resources:
- git@github.com:gituser/kustomize.git/kustomize/main/nginx.yaml

- ssh://github.com/gituser/kustomize.git/kustomize/main/nginx.yaml
</code></pre>
<p>error</p>
<pre><code>Error: accumulating resources: accumulation err='accumulating resources from 'ssh://github.com/diego1277/kustomize.git//kustomize/main/nginx.yaml': evalsymlink failure on '/Users/diego/Desktop/estudo/kustomize/see/base/ssh:/github.com/diego1277/kustomize.git/kustomize/main/nginx.yaml' : lstat /Users/diego/Desktop/estudo/kustomize/see/base/ssh:: no such file or directory': evalsymlink failure on '/private/var/folders/qq/mk6t7dpd5435qm78_zsfdjvm0000gp/T/kustomize-056937086/kustomize/main/nginx.yaml' : lstat /private/var/folders/qq/mk6t7dpd5435qm78_zsfdjvm0000gp/T/kustomize-056937086/kustomize: no such file or directory
</code></pre>

user3573246
<p>Your remote resource needs to resolve to a <em>directory</em> that contains a
<code>kustomization.yaml</code> file. That is, instead of:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- git@github.com:gituser/kustomize.git/kustomize/main/nginx.yaml
</code></pre>
<p>You need:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- git@github.com:gituser/kustomize.git/kustomize/main/
</code></pre>
<p>And your <code>kustomize/main</code> directory should contain
<code>kustomization.yaml</code>. You can try this out using a public repository,
for example:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - &quot;git@github.com:kubernetes-sigs/kustomize/examples/helloWorld&quot;
</code></pre>
