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

syncrypt clone error #4

Closed
jotech opened this issue Jul 31, 2016 · 4 comments
Closed

syncrypt clone error #4

jotech opened this issue Jul 31, 2016 · 4 comments

Comments

@jotech
Copy link

jotech commented Jul 31, 2016

Thanks for coding, it's a very promising project!
I'm working with:

syncrypt (0.1.4 via pip), debian testing, python-3.5.2

I just create a vault and pushed to the server. Then I switched to a different computer, login worked as well as the syncrypt vault to get the vault id (e.g., myvault).
But afterwards the syncrypt clone myvault command failed.
Detailed error log:

Traceback (most recent call last):
  File "/usr/local/bin/syncrypt", line 266, in <module>
    c.run()
  File "/usr/local/bin/syncrypt", line 97, in run
    self.config.directory or self.config.vault_id))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/syncrypt/app/syncrypt.py", line 289, in clone
    backend.get_user_vault_key(self.identity.get_fingerprint(), vault_id)
  File "/usr/local/lib/python3.5/dist-packages/syncrypt/backends/binary.py", line 648, in myco
    return (yield from getattr(conn, name)(*args, **kwargs))
  File "/usr/local/lib/python3.5/dist-packages/syncrypt/backends/binary.py", line 414, in get_user_vault_key
    response = yield from self.read_response()
  File "/usr/local/lib/python3.5/dist-packages/syncrypt/backends/binary.py", line 85, in read_response
    decoded = yield from self.read_term(assert_ok=True)
  File "/usr/local/lib/python3.5/dist-packages/syncrypt/backends/binary.py", line 78, in read_term
    raise ServerError(decoded[1:])
syncrypt.backends.binary.ServerError: ((Atom('not_found'), Atom('Elixir.Syncrypt.UserKey')),)

ERROR:syncrypt.app.syncrypt:(<_UnixSelectorEventLoop running=False closed=True debug=False>, {'exception': OSError(9, 'Bad file descriptor'), 'message': 'Fatal write error on socket transport', 'transport': <_SelectorSocketTransport fd=7>, 'protocol': <asyncio.sslproto.SSLProtocol object at 0x7f6db83b64a8>}), {}
ERROR:syncrypt.app.syncrypt:(<_UnixSelectorEventLoop running=False closed=True debug=False>, {'exception': RuntimeError('Event loop is closed',), 'message': 'Fatal error on SSL transport', 'transport': <_SelectorSocketTransport closing fd=7>, 'protocol': <asyncio.sslproto.SSLProtocol object at 0x7f6db83b64a8>}), {}
@lordi
Copy link
Contributor

lordi commented Jul 31, 2016

Thanks for the report. This happens because you haven't uploaded the encrypted vaultkey for yourself. We need to implement it yet.

You can try to do:

syncrypt keys --upload

on the second machine, and

syncrypt add-user your@email

and on the first machine.

@jotech
Copy link
Author

jotech commented Jul 31, 2016

okay this makes sense, thanks!

But syncrypt keys --upload failed on the second machine with error syncrypt.exceptions.VaultNotInitialized
Nonetheless on the first machine, I could see the fingerprint of the second via syncrypt add-user mail and I could grant access.
Afterwards syncrypt clone worked on the second machine, perfect!

I am right to assume that the fingerprint of a new machine is attached to the account after using syncrypt login the first time and that I have to provide access to the new machine again with add-user?

@lordi
Copy link
Contributor

lordi commented Jul 31, 2016

Yes, you're right. syncrypt login already uploads the public key (with fingerprint), so syncrypt keys --upload is not needed.

Good to know that add-user on oneself works. But it is only a matter of key transmission. You as a user already have access to your own vault, but its simply the fact that the vaultkey was missing.

I think in addition to add-user we should provide a second command that will simply upload the vaultkey for another machine of yours. Like add-machine or so.

@jotech
Copy link
Author

jotech commented Jul 31, 2016

I agree something like add-machine would be more obvious.
Thanks for the support.

@jotech jotech closed this as completed Jul 31, 2016
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

2 participants