<p>I cloned locally podinfo(used for Flux practice)</p>
<pre><code>* master
  remotes/origin/HEAD -&gt; origin/master
  remotes/origin/gh-pages
  remotes/origin/master
  remotes/origin/v0.x
  remotes/origin/v1.x
  remotes/origin/v3.x
  remotes/origin/v5.x
</code></pre>
<p>Anyway</p>
<pre><code>flux get sources git
</code></pre>
<p>shows</p>
<pre><code>podinfo                     False       False   failed to checkout and determine revision: unable to clone 'https://github.com/dexterposh/podinfo': couldn't find remote ref &quot;refs/heads/origin/master&quot; 
</code></pre>
<p>My podinfo.yaml</p>
<pre><code>apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
 name: podinfo
 namespace: flux-system
spec:
 interval: 30s
 ref:
  branch: origin/master
 url: https://github.com/dexterposh/podinfo
</code></pre>
<p>Why did checkout fail?</p>

Richard Rublev
<p>You don't need to add <code>origin</code> to the branch ref. Just <code>branch: master</code> should do it:</p>
<pre><code>apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
 name: podinfo
 namespace: flux-system
spec:
 interval: 30s
 ref:
  branch: master
 url: https://github.com/dexterposh/podinfo
</code></pre>
