librelist archives

« back to archive

Attic create - custom SSH port

Attic create - custom SSH port

From:
Simon Cahuk
Date:
2014-07-06 @ 23:05
Hi!

I have a custom SSH port on my server. I successfully ran attic init with
the custom SSH port but what is the correct syntax for attic create with
the custom SSH port?

Thanks.

Re: [attic] Attic create - custom SSH port

From:
James Holland
Date:
2014-07-06 @ 23:15
On 07/07/14 00:05, Simon Cahuk wrote:
> Hi!
>
> I have a custom SSH port on my server. I successfully ran attic init
> with the custom SSH port but what is the correct syntax for attic create
> with the custom SSH port?
>
> Thanks.

I think it's the same as the init:

attic create ssh://user@hostname:port/repository.attic

Re: [attic] Attic create - custom SSH port

From:
Simon Cahuk
Date:
2014-07-07 @ 18:54
And when I run attic init I get this:

Traceback (most recent call last):

  File "/usr/local/bin/attic", line 5, in <module>

    pkg_resources.run_script('Attic==0.13-1-g4b2dae2-dirty', 'attic')

  File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 488,
in run_script

    self.require(requires)[0].run_script(script_name, ns)

  File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line
1338, in run_script

    execfile(script_filename, namespace, namespace)

  File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 55,
in execfile

    exec(compile(open(fn).read(), fn, 'exec'), globs, locs)

  File

"/usr/local/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/EGG-INFO/scripts/attic",
line 3, in <module>

    main()

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
line 718, in main

    exit_code = archiver.run(sys.argv[1:])

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
line 708, in run

    return args.func(args)

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
line 59, in do_init

    repository = self.open_repository(args.repository, create=True,
exclusive=True)

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
line 32, in open_repository

    repository = RemoteRepository(location, create=create)

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/remote.py",
line 121, in __init__

    self.id = self.call('open', location.path, create)

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/remote.py",
line 127, in call

    for resp in self.call_many(cmd, [args], **kw):

  File

"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/remote.py",
line 158, in call_many

    raise self.RPCError(error)

attic.remote.RPCError: b'PermissionError'


On Mon, Jul 7, 2014 at 1:15 AM, James Holland <holland.james@yahoo.co.uk>
wrote:

> On 07/07/14 00:05, Simon Cahuk wrote:
> > Hi!
> >
> > I have a custom SSH port on my server. I successfully ran attic init
> > with the custom SSH port but what is the correct syntax for attic create
> > with the custom SSH port?
> >
> > Thanks.
>
> I think it's the same as the init:
>
> attic create ssh://user@hostname:port/repository.attic
>

Re: [attic] Attic create - custom SSH port

From:
Jonas Borgström
Date:
2014-07-10 @ 14:06
On 2014-07-07 20:54, Simon Cahuk wrote:
> And when I run attic init I get this:
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/bin/attic", line 5, in <module>
> 
>     pkg_resources.run_script('Attic==0.13-1-g4b2dae2-dirty', 'attic')
> 
>   File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line
> 488, in run_script
> 
>     self.require(requires)[0].run_script(script_name, ns)
> 
>   File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line
> 1338, in run_script
> 
>     execfile(script_filename, namespace, namespace)
> 
>   File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line
> 55, in execfile
> 
>     exec(compile(open(fn).read(), fn, 'exec'), globs, locs)
> 
>   File
> 
"/usr/local/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/EGG-INFO/scripts/attic",
> line 3, in <module>
> 
>     main()
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
> line 718, in main
> 
>     exit_code = archiver.run(sys.argv[1:])
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
> line 708, in run
> 
>     return args.func(args)
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
> line 59, in do_init
> 
>     repository = self.open_repository(args.repository, create=True,
> exclusive=True)
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/archiver.py",
> line 32, in open_repository
> 
>     repository = RemoteRepository(location, create=create)
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/remote.py",
> line 121, in __init__
> 
>     self.id <http://self.id> = self.call('open', location.path, create)
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/remote.py",
> line 127, in call
> 
>     for resp in self.call_many(cmd, [args], **kw):
> 
>   File
> 
"/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Attic-0.13_1_g4b2dae2_dirty-py3.4-macosx-10.9-x86_64.egg/attic/remote.py",
> line 158, in call_many
> 
>     raise self.RPCError(error)
> 
> attic.remote.RPCError: b'PermissionError'


That's weird. It must be some kind of filesystem permission issue on the
remote host. Make sure the remote user can indeed access and write to
the repository you just created. For example:

$ ssh -p 1234 user@hostname attic list /path/to/repo.attic
$ ssh -p 1234 user@hostname attic create /path/to/repo.attic::test
/etc/resolve.conf
$ ssh -p 1234 user@hostname attic list /path/to/repo.attic::test

/ Jonas