git: support for, or better error message on specifying rsync-style git URL

Bug #517174 reported by Luis Arias on 2010-02-04
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Wishlist
Unassigned
Breezy
Wishlist
Jelmer Vernooij

Bug Description

I get the following error and stacktrace in .bzr.log. Running a git clone works fine and so does using bzr with a git:// url. I am running karmic and have installed from Lucid using dpkg on the downloaded debs:

- python-dulwich (0.4.1-1)
- bzr-git (0.4.3-1)

Thanks for looking into this !

luis@persephone:/tmp$ bzr branch git+ssh://<email address hidden>:kaloo/grails.git grails-master.git
ERROR: Repository not found. Make sure you include the .git, e.g. <email address hidden>:defunkt/ambition.git
bzr: ERROR: The remote server unexpectedly closed the connection.

Thu 2010-02-04 19:10:04 +0100
0.052 bzr arguments: [u'branch', u'git+ssh://<email address hidden>:kaloo/grails.git', u'grails-master.git']
0.085 looking for plugins in /home/luis/.bazaar/plugins
0.338 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.341 Plugin name upload already loaded
0.423 encoding stdout as sys.stdout encoding 'UTF-8'
0.578 bzr-svn: using Subversion 1.6.5 ()
4.071 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1215, in run
    revision_id = br_from.last_revision()
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/git/remote.py", line 315, in last_revision
    return self.mapping.revision_id_foreign_to_bzr(self.head)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/git/remote.py", line 329, in head
    heads = self.repository.get_refs()
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/git/remote.py", line 258, in get_refs
    lambda x: None, lambda x: trace.mutter("git: %s" % x))
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/git/remote.py", line 116, in fetch_pack
    raise BzrError(e)
BzrError: The remote server unexpectedly closed the connection.

  status incomplete

You're not specifying a valid URL:

git+ssh://<email address hidden>:kaloo/grails.git

You need a / rather than a : between the hostname and path.

Changed in bzr-git:
status: New → Incomplete

Thanks Jelmer that is working great ! Maybe the error message merits being updated as it was misleading (at least to me):

"ERROR: Repository not found. Make sure you include the .git, e.g. <email address hidden>:defunkt/ambition.git"

On Fri, 2010-02-05 at 07:03 +0000, Luis Arias wrote:
> Thanks Jelmer that is working great ! Maybe the error message merits
> being updated as it was misleading (at least to me):
>
> "ERROR: Repository not found. Make sure you include the .git, e.g.
> <email address hidden>:defunkt/ambition.git"
What would you suggest changing it to?

Cheers,

Jelmer

I just hit this problem. Seems really obvious in hindsight. Github gives you urls like this: "<email address hidden>:ycros/homebrew.git", it would be neat if that form could be detected, and the user informed that they should use "git+ssh://<email address hidden>/ycros/homebrew.git" instead.

On Fri, 2010-02-12 at 03:27 +0000, Ycros wrote:
> I just hit this problem. Seems really obvious in hindsight. Github gives
> you urls like this: "<email address hidden>:ycros/homebrew.git", it would be
> neat if that form could be detected, and the user informed that they
> should use "git+ssh://<email address hidden>/ycros/homebrew.git" instead.

Thats pretty easy to do: register <email address hidden>: as a transport handler
in transport.py, and when invoked error.

-Rob

Jelmer Vernooij (jelmer) wrote :

On Fri, 2010-02-12 at 05:04 +0000, Robert Collins wrote:
> On Fri, 2010-02-12 at 03:27 +0000, Ycros wrote:
> > I just hit this problem. Seems really obvious in hindsight. Github gives
> > you urls like this: "<email address hidden>:ycros/homebrew.git", it would be
> > neat if that form could be detected, and the user informed that they
> > should use "git+ssh://<email address hidden>/ycros/homebrew.git" instead.
>
> Thats pretty easy to do: register <email address hidden>: as a transport handler
> in transport.py, and when invoked error.
That'll only fix things for github though, not any other git sites. I'm
not convinced this is a good idea.

  status wishlist

Cheers,

Jelmer

Jelmer Vernooij (jelmer) wrote :

On Fri, 2010-02-12 at 05:04 +0000, Robert Collins wrote:
> On Fri, 2010-02-12 at 03:27 +0000, Ycros wrote:
> > I just hit this problem. Seems really obvious in hindsight. Github gives
> > you urls like this: "<email address hidden>:ycros/homebrew.git", it would be
> > neat if that form could be detected, and the user informed that they
> > should use "git+ssh://<email address hidden>/ycros/homebrew.git" instead.
>
> Thats pretty easy to do: register <email address hidden>: as a transport handler
> in transport.py, and when invoked error.
That'll only fix things for github though, not any other git sites. I'm
not convinced this is a good idea.

  importance wishlist

Cheers,

Jelmer

Changed in bzr-git:
importance: Undecided → Wishlist
Robert Collins (lifeless) wrote :

On Fri, 2010-02-12 at 09:47 +0000, Jelmer Vernooij wrote:
> I just hit this problem. Seems really obvious in hindsight. Github gives
> > > you urls like this: "<email address hidden>:ycros/homebrew.git", it would be
> ...
> That'll only fix things for github though, not any other git sites. I'm
> not convinced this is a good idea.

Thats true, but github is providing these rsh specs to users as though
they were urls :)

-Rob

Sure, but so are a lot of other sites. We'd need a generic way to warn git users that rsh specs aren't supported, not one specific to github.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij wrote:
> Sure, but so are a lot of other sites. We'd need a generic way to warn
> git users that rsh specs aren't supported, not one specific to github.
>

As one of the major hosting sites, it seems reasonable to have a special
case for it if we can't find an easy way to do a generic solution.

I suppose we could always warn if ':' is found in the path (and not an
obvious drive letter on Windows).

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt9VuAACgkQJdeBCYSNAAMv1ACgiC2XGBClRiETrIfxO6gtkmYt
t7UAn1HAQN3ImvTmqfOpsUaqsSf/RN7l
=1PHk
-----END PGP SIGNATURE-----

John A Meinel wrote:
> Jelmer Vernooij wrote:
>> Sure, but so are a lot of other sites. We'd need a generic way to warn
>> git users that rsh specs aren't supported, not one specific to github.
>
>
> As one of the major hosting sites, it seems reasonable to have a special
> case for it if we can't find an easy way to do a generic solution.

I agree. The most important issue here is ensuring bzr Just Works in a
way that folk already using github would expect.

Ian C.

Jelmer Vernooij (jelmer) on 2010-03-23
Changed in bzr-git:
status: Incomplete → Triaged

I think this should work similarly for Bazaar itself, and then just work for ssh:// and this type of notation.

Changed in bzr-git:
status: Triaged → Fix Committed
Matthew Paul Thomas (mpt) wrote :

(Undoing vandalism by ~arturbryczek.)

Changed in bzr-git:
status: Fix Committed → Confirmed
Jelmer Vernooij (jelmer) on 2018-03-06
Changed in brz-git:
status: New → Triaged
importance: Undecided → Wishlist
Jelmer Vernooij (jelmer) on 2018-04-03
summary: - bzr branch git+ssh : Repository not found. Make sure you include the
- .git, e.g. git@github.com:defunkt/ambition.git
+ support for, or better error message on specifying rsync-style git URL
tags: added: ui
Jelmer Vernooij (jelmer) on 2018-05-10
affects: brz-git → brz
tags: added: git
summary: - support for, or better error message on specifying rsync-style git URL
+ git: support for, or better error message on specifying rsync-style git
+ URL
Jelmer Vernooij (jelmer) on 2018-11-23
Changed in brz:
milestone: none → 3.0.0
Jelmer Vernooij (jelmer) wrote :

Improved warnings have landed in trunk.

Changed in brz:
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: 3.0.0 → 3.1.0
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer) on 2019-03-10
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers