Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError when port specified for SSH #91

Open
rasathus opened this issue Nov 8, 2016 · 5 comments
Open

ValueError when port specified for SSH #91

rasathus opened this issue Nov 8, 2016 · 5 comments

Comments

@rasathus
Copy link

rasathus commented Nov 8, 2016

It looks to be an issue with the underlying Dulwich module, but when using a url such as this ...

ssh://git@server:7999/dply/stuff.git

A ValueError is thrown when it tries to unpack the three components into just a host and path ...

Traceback (most recent call last):
  File "git_test.py", line 9, in <module>
    repo = Gittle.clone(repo_url, repo_path, auth=auth)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 440, in clone
    repo.fetch(bare=bare)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 407, in fetch
    remote_refs = self.fetch_remote(origin_uri)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 364, in fetch_remote
    client, remote_path = self.get_client(origin_uri=origin_uri)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 328, in get_client
    client, remote_path = get_transport_and_path(origin_uri, **client_kwargs)
  File "/usr/lib64/python2.7/site-packages/dulwich/client.py", line 1115, in get_transport_and_path
    user_host, path = location.split(':')
ValueError: too many values to unpack
@jelmer
Copy link

jelmer commented Nov 9, 2016

On Tue, Nov 08, 2016 at 10:15:17AM -0800, Rasathus wrote:

It looks to be an issue with the underlying Dulwich module, but when using a url such as this ...

ssh://git@server:7999/dply/stuff.git

A ValueError is thrown when it tries to unpack the three components into just a host and path ...

Traceback (most recent call last):
  File "git_test.py", line 9, in <module>
    repo = Gittle.clone(repo_url, repo_path, auth=auth)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 440, in clone
    repo.fetch(bare=bare)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 407, in fetch
    remote_refs = self.fetch_remote(origin_uri)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 364, in fetch_remote
    client, remote_path = self.get_client(origin_uri=origin_uri)
  File "/usr/lib/python2.7/site-packages/gittle/gittle.py", line 328, in get_client
    client, remote_path = get_transport_and_path(origin_uri, **client_kwargs)
  File "/usr/lib64/python2.7/site-packages/dulwich/client.py", line 1115, in get_transport_and_path
    user_host, path = location.split(':')
ValueError: too many values to unpack

What version of dulwich are you using?

@rasathus
Copy link
Author

The current pip release for gittle seem to require 0.9.7, which I noted was quite a way behind upstream.

# pip install --upgrade gittle
Collecting gittle
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached gittle-0.5.0.tar.gz
Requirement already up-to-date: paramiko==1.10.0 in /usr/lib/python2.7/site-packages (from gittle)
Requirement already up-to-date: pycrypto==2.6 in /usr/lib64/python2.7/site-packages (from gittle)
Requirement already up-to-date: dulwich==0.9.7 in /usr/lib64/python2.7/site-packages (from gittle)
Requirement already up-to-date: funky==0.0.2 in /usr/lib/python2.7/site-packages (from gittle)
Installing collected packages: gittle
  Running setup.py install for gittle ... done
Successfully installed gittle-0.5.0

@jelmer
Copy link

jelmer commented Nov 10, 2016

On Thu, Nov 10, 2016 at 02:52:09AM -0800, Rasathus wrote:

The current pip release for gittle seem to require 0.9.7, which I noted was quite a way behind upstream.

Yeah, that's very old. Can you reproduce this with a current version of Dulwich? The URL handling code has changed quite a bit.

@jelmer
Copy link

jelmer commented Nov 10, 2016

On Thu, Nov 10, 2016 at 02:52:09AM -0800, Rasathus wrote:

The current pip release for gittle seem to require 0.9.7, which I noted was quite a way behind upstream.

# pip install --upgrade gittle
Collecting gittle
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached gittle-0.5.0.tar.gz
Requirement already up-to-date: paramiko==1.10.0 in /usr/lib/python2.7/site-packages (from gittle)
Requirement already up-to-date: pycrypto==2.6 in /usr/lib64/python2.7/site-packages (from gittle)
Requirement already up-to-date: dulwich==0.9.7 in /usr/lib64/python2.7/site-packages (from gittle)
Requirement already up-to-date: funky==0.0.2 in /usr/lib/python2.7/site-packages (from gittle)
Installing collected packages: gittle
  Running setup.py install for gittle ... done
Successfully installed gittle-0.5.0

Actually, this still seems to happen with the master branch of Dulwich. If you file
a bug about this against the Dulwich project on github, I'll help get it fixed.

(On a separate note, Gittle should really move to a newer version of Dulwich)

Jelmer

@jelmer
Copy link

jelmer commented Dec 25, 2016

FWIW This is fixed in newer versions of Dulwich.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants