GitHub import results in 404 due to not having a default branch
Some imports from GitHub are returning a 404 as soon as they're imported. It looks like they don't have a default branch even if the branch is properly set in the repository:
root@web-01:/var/opt/gitlab/git-data-file12/repositories/<snip>/<snip>.git# cat HEAD
ref: refs/heads/master
work around
Setting the default branch through the API or in the console fixes the issue:
irb(main):006:0> p.default_branch
=> nil
irb(main):007:0> p.change_head("master")
=> "master"
irb(main):008:0> p.default_branch
=> "master"
irb(main):009:0> p.save
=> true