/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: Robert J. Tanner
  • Date: 2009-04-29 05:53:21 UTC
  • mfrom: (4311 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4312.
  • Revision ID: tanner@real-time.com-20090429055321-v2s5l1mgki9f6cgn
[merge] 1.14 back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
458
458
 
459
459
 
460
460
def _paramiko_auth(username, password, host, port, paramiko_transport):
 
461
    auth = config.AuthenticationConfig()
461
462
    # paramiko requires a username, but it might be none if nothing was
462
463
    # supplied.  If so, use the local username.
463
464
    if username is None:
464
 
        username = getpass.getuser()
465
 
 
 
465
        username = auth.get_user('ssh', host, port=port,
 
466
                                 default=getpass.getuser())
466
467
    if _use_ssh_agent:
467
468
        agent = paramiko.Agent()
468
469
        for key in agent.get_keys():
488
489
            pass
489
490
 
490
491
    # give up and ask for a password
491
 
    auth = config.AuthenticationConfig()
492
492
    password = auth.get_password('ssh', host, username, port=port)
493
493
    try:
494
494
        paramiko_transport.auth_password(username, password)