liberapay / git-lfs-fetch.py

Lightweight Git Large File Storage fetcher written in python
31 stars 13 forks source link

Use on Read The Docs #9

Closed bmorris3 closed 3 years ago

bmorris3 commented 3 years ago

Hi,

Thanks for this great package!

I have an almost-functional workflow for getting an lfs file in my Read The Docs build, but it's failing with this error:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/site-packages/sphinx/config.py", line 326, in eval_config_file
    execfile_(filename, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/site-packages/sphinx/util/pycompat.py", line 88, in execfile_
    exec(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/checkouts/latest/docs/conf.py", line 201, in <module>
    git_lfs.fetch(os.path.join(os.path.dirname(__file__), os.path.pardir))
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/site-packages/git_lfs/__init__.py", line 207, in fetch
    lfs_url, lfs_auth_info = get_lfs_endpoint_url(git_repo, checkout_dir)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/site-packages/git_lfs/__init__.py", line 60, in get_lfs_endpoint_url
    auth_header = get_lfs_api_token(host, path)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/site-packages/git_lfs/__init__.py", line 72, in get_lfs_api_token
    output = check_output(query_cmd.split()).strip().decode('utf8')
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/docs/checkouts/readthedocs.org/user_builds/kelp/conda/latest/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ssh', 'git@github.com', 'git-lfs-authenticate', '/bmorris3/kelp.git', 'download']' returned non-zero exit status 255.

Do you have any pointers on what this error means? Thanks in advance.

Changaco commented 3 years ago

It means that downloading the file through SSH isn't working, probably because the RtD server doesn't allow your script to use SSH, for security reasons.

bmorris3 commented 3 years ago

Thanks so much for the tip! Trying this workaround now, will close the issue since it's not actually a git-lfs error.