Skip to content

Failed to init empty repo #49

@agrml

Description

@agrml

Initialization of empty repo does not going well. So I have just installed homely (sudo pip3 install homely) and have an empty GitHub repo to be used. homely add is swearing:

$ homely add git@github.com:agrml/dotfiles.git
[Tue Mar 13 17:13:17 2018]     HOME: /home/mikhail
[Tue Mar 13 17:13:17 2018]     tmp:  /tmp/tmpeyr29m2t/dotfiles
[Tue Mar 13 17:13:17 2018]     Cloning git@github.com:agrml/dotfiles.git to tmp:/tmp/tmpeyr29m2t/dotfiles
[Tue Mar 13 17:13:17 2018]     $ git clone git@github.com:agrml/dotfiles.git /tmp/tmpeyr29m2t/dotfiles
[Tue Mar 13 17:13:17 2018]     &> Cloning into '/tmp/tmpeyr29m2t/dotfiles'...
[Tue Mar 13 17:13:20 2018]     &> warning: You appear to have cloned an empty repository.
Traceback (most recent call last):
  File "/home/mikhail/.local/bin/homely", line 11, in <module>
    sys.exit(main())
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_cli.py", line 346, in main
    homely()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_cli.py", line 37, in proxy
    command(**kwargs)
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_cli.py", line 99, in add
    localrepo, needpull = addfromremote(repo, dest_path)
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_ui.py", line 310, in addfromremote
    tmprepoid = localrepo.getrepoid()
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_vcs/git.py", line 92, in getrepoid
    raise RepoHasNoCommitsError()
homely._errors.RepoHasNoCommitsError

Why should it be disallowed?
Ok, now the repo has a commit with readme. But homely still can't create dotfiles folder:

$ homely add git@github.com:agrml/dotfiles.git
[Tue Mar 13 17:19:52 2018]     HOME: /home/mikhail
[Tue Mar 13 17:19:52 2018]     tmp:  /tmp/tmpwaucr_16/dotfiles
[Tue Mar 13 17:19:52 2018]     Cloning git@github.com:agrml/dotfiles.git to tmp:/tmp/tmpwaucr_16/dotfiles
[Tue Mar 13 17:19:52 2018]     $ git clone git@github.com:agrml/dotfiles.git /tmp/tmpwaucr_16/dotfiles
[Tue Mar 13 17:19:52 2018]     &> Cloning into '/tmp/tmpwaucr_16/dotfiles'...
Warning: the RSA host key for 'github.com' differs from the key for the IP address '192.30.253.113'
Offending key for IP in /home/mikhail/.ssh/known_hosts:34
Matching host key in /home/mikhail/.ssh/known_hosts:41
Are you sure you want to continue connecting (yes/no)? yes
Traceback (most recent call last):
  File "/home/mikhail/.local/bin/homely", line 11, in <module>
    sys.exit(main())
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_cli.py", line 346, in main
    homely()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_cli.py", line 37, in proxy
    command(**kwargs)
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_cli.py", line 99, in add
    localrepo, needpull = addfromremote(repo, dest_path)
  File "/home/mikhail/.local/lib/python3.5/site-packages/homely/_ui.py", line 344, in addfromremote
    os.rename(tmp, dest_path)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpwaucr_16/dotfiles' -> '/home/mikhail/dotfiles'

What am I doing wrong?

Ubuntu 16.04 (4.4.0-116-generic) x86-64. Homely 0.15.2 via pip3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions