inducer / inducer/relate

Creating a repo without an SSH key causes a cryptic error

Open
#686 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
435
Forks
124
Avg merge
5h 40m
Merged PRs (30d)
14

Description

When I attempt to create a new site without an SSH key, RELATE generates the error message

```
TypeError: startswith first arg must be str or a tuple of str, not bytes
```

This is generated in the error-handling code which deals with `HangupException`s, and is presumably a quick fix since it apparently has to do with the bytes v. str issues.

My local instance traceback:

```
Traceback (most recent call last):
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/client.py", line 814, in fetch_pack
refs, server_capabilities = read_pkt_refs(proto)
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/client.py", line 211, in read_pkt_refs
for pkt in proto.read_pkt_seq():
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/protocol.py", line 254, in read_pkt_seq
pkt = self.read_pkt_line()
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/protocol.py", line 202, in read_pkt_line
raise HangupException()
dulwich.errors.HangupException: The remote server unexpectedly closed the connection.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/davis68/Code/relate/course/versioning.py", line 261, in set_up_new_course
raise e
File "/home/davis68/Code/relate/course/versioning.py", line 194, in set_up_new_course
remote_refs = client.fetch(remote_path, repo)
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/client.py", line 398, in fetch
progress=progress, depth=depth)
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/client.py", line 816, in fetch_pack
raise remote_error_from_stderr(stderr)
File "/home/davis68/Code/anaconda3/lib/python3.7/site-packages/dulwich/client.py", line 688, in remote_error_from_stderr
if l.startswith(b'ERROR: '):
TypeError: startswith first arg must be str or a tuple of str, not bytes
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.