bentoml / bentoctl

Fast model deployment on any cloud 🚀

Home Page:https://bentoml.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding any operator throws a `git access error`

mauricioalarcon opened this issue · comments

Describe the bug
Trying to add any operator to bentoctl errors out with a git clone related issue

To Reproduce

Steps to reproduce the issue:

  1. Install the latest pre release via pip install —pre bentoctl==1.0.0a4
  2. Try to install sagemaker via bentoctl operator add aws-sagemaker or bentoctl operator add aws-lambda returns
Traceback (most recent call last):
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/bin/bentoctl", line 8, in <module>
    sys.exit(bentoctl())
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/cli/utils.py", line 43, in wrapper
    return func(*args, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/cli/operator_management.py", line 82, in add
    operator_name = local_operator_registry.add(name)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/operator/registry.py", line 93, in add
    content_path = _clone_git_repo(git_url, branch=branch)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/operator/utils.py", line 85, in _clone_git_repo
    repo = Repo.clone_from(git_url, temp_operator_repo)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/repo/base.py", line 1148, in clone_from
    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, multi_options, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/repo/base.py", line 1086, in _clone
    finalize_process(proc, stderr=stderr)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/util.py", line 386, in finalize_process
    proc.wait(**kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/cmd.py", line 501, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git clone -v git@github.com:bentoml/aws-lambda-deploy.git /var/folders/64/692xs7fj6zb2f87tbtlkj72w0000gn/T/tmphe5wh9du
  stderr: 'Cloning into '/var/folders/64/692xs7fj6zb2f87tbtlkj72w0000gn/T/tmphe5wh9du'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
'

I created this PR to fix this issue #91

fixed thanks to PR #91 from @mauricioalarcon 🙌🏽