src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.91k stars 542 forks source link

Can't clone repo, unexpected client error: reference not found, #1278

Open kobrasz opened 4 years ago

kobrasz commented 4 years ago

I can't clone from private repository. I found out that go-git checking in method createHeadIfCorrectReference if reference.Hash() == *a.Head but my repo not contain reference that commit is equal to repository HEAD commit. In &git.CloneOptions I only use Auth and URL. My output when doing git remote show origin on repo clonned by git clone:

  • remote origin Fetch URL: Push URL: HEAD branch: (unknown) Remote branch: master tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date)

Can someone help me with this? The problem is with my &git.CloneOptions or with method that I'm pushing to remote?