[Duplicity-team] [Question #190424]: Google Docs backend authentication problem
New question #190424 on Duplicity: https://answers.launchpad.net/duplicity/+question/190424 I tried the gdocs backend with duplicity 0.6.17 and .18 It fails with a gdata.client.BadAuthentication exception; Cyberduck (Mac OS X) connects successfully using the same credentials duplicity receives 'username%40gmail@docs.google.com/...' 2-step verification is not enabled for this gmail account. Is there a known problem with this backend ? -- You received this question notification because you are a member of duplicity-team, which is an answer contact for Duplicity. ___ Mailing list: https://launchpad.net/~duplicity-team Post to : duplicity-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp
Re: [Duplicity-team] [Question #190424]: Google Docs backend authentication problem
Question #190424 on Duplicity changed: https://answers.launchpad.net/duplicity/+question/190424 Description changed to: I tried the gdocs backend with duplicity 0.6.17 and .18 It fails with a gdata.client.BadAuthentication exception; Cyberduck (Mac OS X) connects successfully using the same credentials duplicity receives 'username%40gmail@docs.google.com/...' 2-step verification is not enabled for this gmail account. Is there a known problem with this backend ? -- Update: Please disregard this question. The URL format was wrong. -- You received this question notification because you are a member of duplicity-team, which is an answer contact for Duplicity. ___ Mailing list: https://launchpad.net/~duplicity-team Post to : duplicity-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp
Re: [Duplicity-team] [Question #190424]: Google Docs backend authentication problem
Question #190424 on Duplicity changed: https://answers.launchpad.net/duplicity/+question/190424 edso posted a new comment: On 12.03.2012 15:11, Richard wrote: Question #190424 on Duplicity changed: https://answers.launchpad.net/duplicity/+question/190424 Description changed to: I tried the gdocs backend with duplicity 0.6.17 and .18 It fails with a gdata.client.BadAuthentication exception; Cyberduck (Mac OS X) connects successfully using the same credentials duplicity receives 'username%40gmail@docs.google.com/...' 2-step verification is not enabled for this gmail account. Is there a known problem with this backend ? -- Update: Please disregard this question. The URL format was wrong. anything we could make clearer in the manpage? ede/duply.net -- You received this question notification because you are a member of duplicity-team, which is an answer contact for Duplicity. ___ Mailing list: https://launchpad.net/~duplicity-team Post to : duplicity-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp
Re: [Duplicity-team] [Question #190424]: Google Docs backend authentication problem
Question #190424 on Duplicity changed: https://answers.launchpad.net/duplicity/+question/190424 Richard posted a new comment: I don't know. Something else matters though: the current code in gdocsbackend.py does not work against the latest version of gdata, the client library. I sent an email to the author about it. He explained that it was coded against an earlier version of gdata (2.0.14), and that changes have been made since then which break the code. He just created a new branch to start fixing it: http://bazaar.launchpad.net/~carlos-abalde/duplicity/gdocs-backend-gdata-2.0.16.-upgrade/revision/848 -- You received this question notification because you are a member of duplicity-team, which is an answer contact for Duplicity. ___ Mailing list: https://launchpad.net/~duplicity-team Post to : duplicity-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp
[Duplicity-team] [Merge] lp:~ed.so/duplicity/0.6-ssh_add_missinghostkey into lp:duplicity
edso has proposed merging lp:~ed.so/duplicity/0.6-ssh_add_missinghostkey into lp:duplicity. Requested reviews: duplicity-team (duplicity-team) For more details, see: https://code.launchpad.net/~ed.so/duplicity/0.6-ssh_add_missinghostkey/+merge/97085 add missing_host_key prompt to new sshbackend similar to ssh procedure -- https://code.launchpad.net/~ed.so/duplicity/0.6-ssh_add_missinghostkey/+merge/97085 Your team duplicity-team is requested to review the proposed merge of lp:~ed.so/duplicity/0.6-ssh_add_missinghostkey into lp:duplicity. === modified file 'Changelog.GNU' --- Changelog.GNU 2012-03-08 14:47:34 + +++ Changelog.GNU 2012-03-12 18:38:19 + @@ -1,3 +1,7 @@ +2012-03-12 edso + + add missing_host_key prompt to new sshbackend similar to ssh procedure + 2012-02-29 kenn...@loafman.com Changes for 0.6.18. === modified file 'duplicity/backends/sshbackend.py' --- duplicity/backends/sshbackend.py 2012-03-08 12:43:08 + +++ duplicity/backends/sshbackend.py 2012-03-12 18:38:19 + @@ -29,6 +29,7 @@ import errno import sys import getpass +from binascii import hexlify # debian squeeze's paramiko is a bit old, so we silence randompool depreciation warning # note also: passphrased private keys work with squeeze's paramiko only if done with DES, not AES @@ -70,6 +71,7 @@ self.remote_dir = '.' self.client = paramiko.SSHClient() +self.client.set_missing_host_key_policy(AgreedAddPolicy()) # load known_hosts files # paramiko is very picky wrt format and bails out on any problem... try: @@ -78,7 +80,13 @@ except Exception, e: raise BackendException(could not load /etc/ssh/ssh_known_hosts, maybe corrupt?) try: -self.client.load_system_host_keys() +# use load_host_keys() to signal it's writable to paramiko +# load if file exists or add filename to create it if needed +file = os.path.expanduser('~/.ssh/known_hosts') +if os.path.isfile(file): +self.client.load_host_keys(file) +else: +self.client._host_keys_filename = file except Exception, e: raise BackendException(could not load ~/.ssh/known_hosts, maybe corrupt?) @@ -319,6 +327,33 @@ return sshconfig.lookup(host) +class AgreedAddPolicy (paramiko.AutoAddPolicy): + +Policy for showing a yes/no prompt and adding the hostname and new +host key to the known host file accordingly. + +This class simply extends the AutoAddPolicy class with a yes/no prompt. + +def missing_host_key(self, client, hostname, key): +fp = hexlify(key.get_fingerprint()) +fingerprint = ':'.join(a+b for a,b in zip(fp[::2], fp[1::2])) +question = The authenticity of host '%s' can't be established. +%s key fingerprint is %s. +Are you sure you want to continue connecting (yes/no)? % (hostname, key.get_name().upper(), fingerprint) +while True: +sys.stdout.write(question) +choice = raw_input().lower() +if choice in ['yes','y']: +super(AgreedAddPolicy, self).missing_host_key(client, hostname, key) +return +elif choice in ['no','n']: +raise AuthenticityException( hostname ) +else: +question = Please type 'yes' or 'no': + +class AuthenticityException (paramiko.SSHException): +def __init__(self, hostname): +paramiko.SSHException.__init__(self, 'Host key verification for server %s failed.' % hostname) duplicity.backend.register_backend(sftp, SftpBackend) ___ Mailing list: https://launchpad.net/~duplicity-team Post to : duplicity-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp
Re: [Duplicity-team] [Question #190424]: Google Docs backend authentication problem
Question #190424 on Duplicity changed: https://answers.launchpad.net/duplicity/+question/190424 edso posted a new comment: On 12.03.2012 18:05, Richard wrote: Question #190424 on Duplicity changed: https://answers.launchpad.net/duplicity/+question/190424 Richard posted a new comment: I don't know. Something else matters though: the current code in gdocsbackend.py does not work against the latest version of gdata, the client library. I sent an email to the author about it. He explained that it was coded against an earlier version of gdata (2.0.14), and that changes have been made since then which break the code. He just created a new branch to start fixing it: http://bazaar.launchpad.net/~carlos-abalde/duplicity/gdocs-backend-gdata-2.0.16.-upgrade/revision/848 could you please test those changes and verify everything works? when that's done the author should propose the branch for merging. ..ede/duply.net -- You received this question notification because you are a member of duplicity-team, which is an answer contact for Duplicity. ___ Mailing list: https://launchpad.net/~duplicity-team Post to : duplicity-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~duplicity-team More help : https://help.launchpad.net/ListHelp