13

When trying to install the gem "u2f" from the repo at "castle/ruby-u2f" I get an error message:

Fetching git://github.com/castle/ruby-u2f.git
fatal: Needed a single revision
Revision master does not exist in the repository git://github.com/castle/ruby-u2f.git. Maybe you misspelled it?

I cannot find any information about this error message. The text does not appear in any of the bundler source files, so I don't even know where to start debugging.

If anyone has any insight into the source and cause of this error, I'd love to know.

Les Nightingill
  • 5,662
  • 1
  • 29
  • 32
  • I can confirm getting a revision does not exist error for a revision that is definitely there in a public repo. Weird that I was able to use a different rev just fine. – s2t2 Sep 22 '18 at 01:03

2 Answers2

28

If you're trying to install a gem from a github source and got this, it may be because the repo changed its default branch from "master" to "main". Try adding branch: 'main' and see if it works.

The complete line in your gemfiles is then (comment by @Ryan):

gem 'gemname', git: 'github.com/gempath/gemname', branch: 'main'
Cadoiz
  • 1,446
  • 21
  • 31
Matheus Richard
  • 654
  • 8
  • 19
1

Try pulling from the master branch

teddybear
  • 546
  • 2
  • 6
  • 14