M dulwich/client.py +1 -1
@@ 1924,7 1924,7 @@ def get_credentials_from_store(scheme, h
try:
with open(fname, 'rb') as f:
for line in f:
- parsed_line = urlparse(line)
+ parsed_line = urlparse(line.strip())
if (parsed_line.scheme == scheme and
parsed_line.hostname == hostname and
(username is None or
M dulwich/tests/test_client.py +1 -1
@@ 1336,7 1336,7 @@ class GitCredentialStoreTests(TestCase):
@classmethod
def setUpClass(cls):
with tempfile.NamedTemporaryFile(delete=False) as f:
- f.write(b'https://user:pass@example.org')
+ f.write(b'https://user:pass@example.org\n')
cls.fname = f.name
@classmethod