Skip to content

Renku repo initialising error following git config error #712

@jen-thomas

Description

@jen-thomas

Describe the bug
Received a git config error when initialising a Renku repo. Resolved the git error and returned to initialise the repo, but received the error that the repo was not empty and to use --force.

I since deleted the directory and started again and it worked fine.

To Reproduce
Steps to reproduce the behavior:

renku init cruise-track-1hour
Error: The user name and email are not configured. Please use the "git config" command to configure them.

git config --global --add user.name "John Doe"
git config --global --add user.email "john.doe@example.com"

I added the details as described above

renku init cruise-track-1hour
Usage: renku init [OPTIONS] [DIRECTORY]

Error: Renku repository is not empty. Please use --force flag to use the directory as Renku repository.

ls -a cruise-track-1hour/
. .. .git .renku .renku.lock

renku init --force cruise-track-1hour
Ahhhhhhhh! You have found a bug. 🐞

  1. Open an issue by typing "open";
  2. Print human-readable information by typing "print";
  3. See the full traceback without submitting details (default: "ignore").

Desktop (please complete the following information):
Renku version: 0.6.1.dev3
OS: Linux (#1 SMP Debian 4.19.67-2 (2019-08-28))
Python: 3.7.3

Additional context

Traceback

Traceback (most recent call last):
  File "[...]/renku/cli/_exc.py", line 100, in main
    result = super().main(*args, **kwargs)
  File "[...]/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "[...]/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "[...]/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "[...]/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "[...]/renku/cli/_client.py", line 86, in new_func
    result = ctx.invoke(method, client, *args, **kwargs)
  File "[...]/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "[...]/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "[...]/renku/cli/init.py", line 128, in init
    str(client.renku_metadata_path),
  File "[...]/renku/api/repository.py", line 221, in find_previous_commit
    file_commits = list(self.repo.iter_commits(revision, paths=paths))
  File "[...]/site-packages/git/objects/commit.py", line 279, in _iter_from_process_or_stream
    finalize_process(proc_or_stream)
  File "[...]/site-packages/git/util.py", line 333, in finalize_process
    proc.wait(**kwargs)
  File "[...]/site-packages/git/cmd.py", line 412, in wait
    raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git rev-list HEAD -- /home/jen/projects/ace_data_management/renku-projects/cruise-track-1hour/.renku/metadata.yml
  stderr: 'fatal: bad revision 'HEAD'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions