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

fails to git-clone Yelp/kafka-utils with exit code 128 #67

Open
calvinli opened this issue Sep 25, 2020 · 0 comments
Open

fails to git-clone Yelp/kafka-utils with exit code 128 #67

calvinli opened this issue Sep 25, 2020 · 0 comments

Comments

@calvinli
Copy link
Member

We encountered the following traceback using this to scan https://github.com/Yelp/kafka-utils:

  File "/code/virtualenv_run/lib/python3.6/site-packages/detect_secrets_server/__main__.py", line 30, in main
    actions.add_repo(args)
  File "/code/virtualenv_run/lib/python3.6/site-packages/detect_secrets_server/actions/initialize.py", line 25, in add_repo
    _clone_and_save_repo(repo)
  File "/code/virtualenv_run/lib/python3.6/site-packages/detect_secrets_server/actions/initialize.py", line 125, in _clone_and_save_repo
    repo.storage.clone()
  File "/code/virtualenv_run/lib/python3.6/site-packages/detect_secrets_server/storage/base.py", line 80, in clone
    self._repo_location,
  File "/code/virtualenv_run/lib/python3.6/site-packages/detect_secrets_server/storage/core/git.py", line 47, in clone_repo_to_location
    ], stderr=subprocess.STDOUT)
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/Yelp/kafka-utils', '[...truncated...]', '--bare']' returned non-zero exit status 128.

Manual testing showed that the error message from git is:

Cloning into bare repository '[...truncated...]'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly

The issue can be reproduced by running git clone https://github.com/Yelp/kafka-utils some_test_dir/ --bare >./test_stdout 2>&1 (simulating what subprocess.check_output is doing).

We also found that adding --progress makes it work, for unclear reasons:

$ git clone https://github.com/Yelp/kafka-utils some_test_dir/ --bare --progress >./test_stdout 2>&1
$ echo $?
0

Reproduced on git versions 2.16.2, 2.22.0, 2.25.0.

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

1 participant