I know that the GitHub web interface lets you search all repositories for files with a particular pathname (e.g. searching for path:/app/models/user.rb yields >
path:/app/models/user.rb
Does the search user.rb in:path do what you want to do? Alternatively there is also this search filename:user.rb
user.rb in:path
filename:user.rb
Found on: https://help.github.com/articles/searching-code/