access denied on Pageant .pag file

Bug #820805 reported by Martin Pool
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Undecided
Unassigned
PuTTY
New
Undecided
Unassigned
paramiko
New
Undecided
Unassigned

Bug Description

I reinstalled Windows, so I had to reinstall Bazaar as well..
Used Pageant to generate a new public/private key and added it to Pageant.
Also ran 'bzr launchpad-login tvd'.

What am I doing wrong? See log below..
It's also looking for a .ssh/known_hosts file that doesn't exist...

------

Tue 2011-08-02 21:04:20 +0200
0.047 bazaar version: 2.4b5
0.047 bzr arguments: [u'branch', u'lp:~tvd/moo/devmoo']
0.078 looking for plugins in C:/Users/Tim van Dijen/AppData/Roaming/bazaar/2.0/plugins
0.078 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.109 encoding stdout as sys.stdout encoding 'cp850'
0.187 falling back to default implementation
0.187 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Users\\Tim van Dijen/.ssh/known_hosts'
[ 3932] 2011-08-02 21:04:20.506 INFO: Connected (version 2.0, client Twisted)
0.499 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.499 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 946, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1150, in run_bzr
  File "bzrlib\commands.pyo", line 699, in run_argv_aliases
  File "bzrlib\commands.pyo", line 721, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1263, in run
  File "bzrlib\bzrdir.pyo", line 918, in open_tree_or_branch
  File "bzrlib\bzrdir.pyo", line 828, in open
  File "bzrlib\bzrdir.pyo", line 863, in open_from_transport
  File "bzrlib\bzrdir.pyo", line 1590, in open
  File "bzrlib\remote.pyo", line 293, in _open
  File "bzrlib\remote.pyo", line 356, in __init__
  File "bzrlib\remote.pyo", line 368, in _probe_bzrdir
  File "bzrlib\remote.pyo", line 375, in _rpc_open_2_1
  File "bzrlib\remote.pyo", line 56, in _call
  File "bzrlib\smart\client.pyo", line 132, in call
  File "bzrlib\smart\client.pyo", line 145, in call_expecting_body
  File "bzrlib\smart\client.pyo", line 90, in _call_and_read_response
  File "bzrlib\smart\client.pyo", line 63, in _send_request
  File "bzrlib\smart\protocol.pyo", line 1309, in call
  File "bzrlib\smart\protocol.pyo", line 1133, in _write_end
  File "bzrlib\smart\protocol.pyo", line 1099, in flush
  File "bzrlib\smart\medium.pyo", line 395, in accept_bytes
  File "bzrlib\smart\medium.pyo", line 977, in _accept_bytes
  File "bzrlib\smart\medium.pyo", line 793, in _accept_bytes
  File "bzrlib\smart\medium.pyo", line 817, in _ensure_connection
  File "bzrlib\transport\ssh.pyo", line 332, in connect_ssh
  File "bzrlib\transport\ssh.pyo", line 320, in _connect
  File "bzrlib\transport\ssh.pyo", line 497, in _paramiko_auth
  File "paramiko\agent.pyo", line 78, in __init__
  File "paramiko\agent.pyo", line 109, in _send_message
  File "paramiko\win_pageant.pyo", line 136, in send
  File "paramiko\win_pageant.pyo", line 121, in _query_pageant
WindowsError: [Error 5] Access Denied: 'f:\\temp\\tmpeb__7s.pag'

0.499 return code 3

Tags: win32
Revision history for this message
Martin Packman (gz) wrote :

This looks similar to a problem a user on IRC ran into recently:
<http://irclogs.ubuntu.com/2011/07/16/%23bzr.html#t13:52>

In that case, I believe it was caused by running the Pageant exe straight from the downloads folder rather than installing it, which on Windows 7 trips some access protections designed to isolate files that come from the internet.

Revision history for this message
John A Meinel (jameinel) wrote :

This seems more like a bug in pageant than anything in bzr. However, if we can reproduce it, we can try to at least give hints as to how to fix it.

Changed in bzr:
status: New → Incomplete
Revision history for this message
Martin Packman (gz) wrote :

Yes, it's possibly a bug in the launchpad getting started docs instead, which seemed surprisingly hard to follow unless you've already got ssh and gpg set up.

Revision history for this message
Alexander Regueiro (alexreg) wrote :

I'm getting this bug too. Pageant seems to lock the .pag file.

Changed in bzr:
status: Incomplete → Confirmed
Revision history for this message
Alexander Regueiro (alexreg) wrote :

Okay, an update on this: I seem to only get this bug when running bzr (and thus pageant) from an elevated console. Given that the mentioned temp file is my user directory, this seems to be a permissions issue. In any case, it's solely to do with Pageant it seems, and should really be filed as a bug there at some point. Perhaps others can confirm this for me.

Revision history for this message
Andreas Sommer (andidog) wrote :

I tried installing PuTTY (including Pageant) on Windows 7 x64, but still get the same problem. Procexp shows me that Pageant really has an open handle to the .pag file.

Revision history for this message
Martin Packman (gz) wrote :

It seems like bug 644995 may also be involved on win64, or at least that the IPC mechanism between paramiko and pageant needs fixing somehow.

As a workaround, could try trading for a different set of issues (see bug 414743) by setting BZR_SSH=plink after manually connecting to accept the server fingerprint.

Revision history for this message
Andreas Sommer (andidog) wrote :

I just compiled the most recent development source of Pageant (http://tartarus.org/~simon/putty-snapshots/putty-src.zip) using MSVC. With that pageant.exe it seems to work! Can anyone confirm this?

Revision history for this message
Dan Fischbach (blindwolf8) wrote :

I have some clients currently working on a project using Bazaar 2.4.2 and they came across this error as well. I cannot reproduce this error on two computers and one clean virtual machine for testing purposes. The clients as well as myself are using PuTTY 0.61 and Windows 7 Home Premium x64. I am not sure who's at fault here. I told the clients to get the 0.61 Windows installer from the PuTTY homepage.

Any help would be appreciated.

Revision history for this message
Vincent Ladeuil (vila) wrote :

I seem to recall someone mentioning that running pageant as an admin instead of running it as the user that needs it was triggering a similar issue ?

Revision history for this message
Martin Packman (gz) wrote :

See this thread on the Bazaar mailing list for more information:

<https://lists.ubuntu.com/archives/bazaar/2011q4/073941.html>

For people hitting this, your first check should be that Pageant and Bazaar are running as the same user with exactly the same privileges. We'll try and get the resultant problems fixed in the upstream projects.

Revision history for this message
Dan Fischbach (blindwolf8) wrote :

As far as I know on my end nothing was different between computers. The client machines were running as admins.

Revision history for this message
Martin Packman (gz) wrote :

A fix on the Pageant side is now available and should be enough in most cases. Please download the 0.62 pre-release (scroll down the page a little) and report whether this resolves the issue for you:

<http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html>

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
tags: added: win32
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.