bumplzz69 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gnome-keyring interferes with gcloud ssh & copy-files #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
NOTE: THIS ISSUE HAS BEEN CROSS-POSTED AT:
http://stackoverflow.com/questions/28428577/gnome-keyring-interfering-with-gclou
d-ssh-copy-files
https://groups.google.com/forum/?fromgroups#!topic/google-cloud-sdk/voxZDVSD6Bg

What steps will reproduce the problem?

Attempt to run "gcloud compute ssh" or "gcloud compute copy-files" on a machine 
running (plain-vanilla) ubuntu 14.04.  (For example, I was using "gcloud 
compute ssh asparagus6000_gmail_com@instance-1 --zone us-central1-f --project 
coenia-851")
In case it matters, I have been installing gcloud with apt-get:
sudo apt-add-repository "http://archive.canonical.com/ubuntu partner"
sudo apt-get update
sudo apt-get install google-cloud-sdk

What is the expected output? What do you see instead?

I expected an SSH session to begin the the terminal window.  Instead I get 
dialogue box pop-up:
"Enter password to unlock the private key.
 An application wants to access the private key 'trashmob@superminion', but it is locked"
I believe this dialogue box expects the user's login password on the local 
machine, but when I enter mine, the password is always rejected.  (This happens 
regardless of whether or not an account with admin privileges is used.)

What is the output of 'gcloud info'?

Google Cloud SDK [0.9.37]

Platform: [Linux, x86_64]
Python Version: [2.7.6 (default, Mar 22 2014, 22:59:56)  [GCC 4.8.2]]
Site Packages: [Disabled]

Installation Root: [/usr/lib/google-cloud-sdk]
Installed Components:
  core: [2014.11.25]
  core-nix: [2014.11.25]
  compute: [2014.11.25]
  gsutil-nix: [4.6]
  gsutil: [4.6]
  bq: [2.0.18]
  dns: [2014.11.25]
  sql: [2014.11.25]
  gcutil: [1.16.5]
  gcutil-nix: [1.16.5]
  bq-nix: [2.0.18]
System PATH: 
[/home/jewett/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
usr/games:/usr/local/games:/home/jewett/bin:/home/jewett/moltemplate/src]
Cloud SDK on PATH: [False]

WARNING: There are old versions of the Google Cloud Platform tools on your 
system PATH.
  /usr/bin/gcloud
  /usr/bin/git-credential-gcloud.sh
  /usr/bin/bq
  /usr/bin/gsutil
  /usr/bin/gcutil

Installation Properties: [/usr/lib/google-cloud-sdk/properties]
User Config Directory: [/home/jewett/.config/gcloud]
User Properties: [/home/jewett/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [asparagus6000@gmail.com]
Project: [None]

Current Properties:
  [core]
    account: [asparagus6000@gmail.com]
    user_output_enabled: [True]

Logs Directory: [/home/jewett/.config/gcloud/logs]
Last Log File: [/home/jewett/.config/gcloud/logs/2015.02.10/01.09.27.729486.log]

Please provide any additional information below.

This only happens with ubuntu, not with kubuntu 14.10.  (I am able to ssh and 
send files without difficulty in kubuntu.)  

kubuntu uses KDE instead of GNOME, and particular dialogue box appears to be a 
feature of gnome-keyring-manager.  (It is not easy to disable.)

Work-around:
I recommend that users change their window manager to KDE.

More evidence that it is a gnome problem: gcloud uses ECDSA, and gnome-keyring 
does not yet fully support ECDSA (ed25519?)
https://bugzilla.gnome.org/show_bug.cgi?id=641082

Cheers
Andrew

P.S.
I ran into several other errors as well, but those may have been my fault.  
While trying to get around this particular issue, I tried using gcloud with 
different arguments.  In some cases no dialogue-box appears, but ssh fails 
because of a permission problem.  (I forget the exact error message or what I 
did to receive it.)  Those error messages resemble some of the other 
difficulties that other people have been having with ssh.

Probably, none of this is google's fault.  I got a response from Jeff Vaughn:
> On Tue, Feb 10, 2015 at 9:19 AM, Jeff Vaughan <xxxxxx@google.com> wrote:
> That seems like an issue we need to fix/work around.  I opened a bugnanizer 
ticket to track this:
>   http://b/19332620

Original issue reported on code.google.com by jewett....@gmail.com on 11 Feb 2015 at 11:44

GoogleCodeExporter commented 9 years ago
I was unable to reproduce on a new ubuntu 14.04 vmware vm.

Original comment by stephe...@google.com on 18 Feb 2015 at 6:49

GoogleCodeExporter commented 9 years ago
Is there any setup needed to use the gnome key ring? All I did was install a 
new 14.04 VM and run your three commands to install gcloud from the partner 
repos.

Original comment by stephe...@google.com on 18 Feb 2015 at 6:51

GoogleCodeExporter commented 9 years ago
I am not sure if that kind of test would work, but I have little
experience with virtual machines.

To clarify the issue:

I highly doubt that this problem will occur if you remotely ssh to a
machine running ubuntu (virtual or not), and then on that machine run
"gcloud compute ssh".  If that's what you are doing, you probably will
not be able to reproduce the error.

In my case it happens when you are directly (physically) at the computer.
(...using the default window manager that comes with ubuntu, logged in
from the splash-screen that appears after startup.  You need to be in
the full windowing environment.)

  No.  I certainly am not consciously aware of having done anything
manual to activate gnome keyring or change it's default behaviour.
However I installed my operating system 10 months ago, and a lot of
settings could have been changed between now and then.

  To rule out this possibility, I will create a bootable USB stick
running plain vanilla ubuntu 14.04 and see if the same problem occurs.
I suspect that it will, but I will report back today either way.
Thanks for following up with this.

Andrew
I'll email back later today.

Original comment by jewett....@gmail.com on 18 Feb 2015 at 7:58

GoogleCodeExporter commented 9 years ago
To be clear, I installed vanilla desktop ubuntu. I just did it in a VM (think 
virtualbox) instead of a physical computer. I did not ssh into the box.

Original comment by stephe...@google.com on 18 Feb 2015 at 8:17

GoogleCodeExporter commented 9 years ago
I finally did that and I am ashamed to admit that the problem disappears.
(I should have tried this but it takes time.)

Please close this issue.
I apologize for wasting everyone's time.

However I can suggest an even easier work-around for people who are
experiencing this problem:

   If your computer is having this issue, try creating a new user account.
   In my case, the problem (with gcloud compute ssh) disappears.  This
is odd because I had tested it on several different accounts before I
reported the problem.  (I repeated those tests today, and the problem
returned).  So the problem appears to be something specific to the way
ssh was configured on this computer for those particular users (one
admin user, one regular user).

   So I suggest creating a new user account and copy the old user's
files to the new account (excluding the hidden files and folders).
(You could also try resetting your gnome-keyring and ssh settings).

Original comment by jewett....@gmail.com on 18 Feb 2015 at 11:17

GoogleCodeExporter commented 9 years ago
Unfortunately I was wrong about this also.  My apologies.
That does not solve the problem.
It turned out that one of my recently created (but not new) user
accounts does not (or did not) have this problem.
However deleting that user's ~/.ssh or ~/.local/share/keyrings
directories and trying gcloud again causes the problem to appear.
And newly created account DO have the problem.

So my original suggestion (using KDE instead of gnome) might have been
a better one.

If I figure out what's causing this, I'll email back.

Original comment by jewett....@gmail.com on 19 Feb 2015 at 12:55

GoogleCodeExporter commented 9 years ago
Conclusion:
    The problem does not occur on a fresh install of ubuntu 14.04.

    If anyone else runs into this problem, I was finally able to get
gcloud ssh working on the original problematic OS, (with all the user
accounts on that computer that were having difficulty) using these
steps:

1) I deleted these two directories:
      ~/.local/share/keyrings
      ~/.ssh
  (Perhaps it was not necessary to delete the .ssh directory.)

2) I logged out of the user account on my local machine.
     (This step seems to be important.)

3) Then I logged in again.

4) Then I attempted to connect with "gcloud auth login" and "gcloud
compute ssh".

After one or two iterations of steps 1-4, things eventually started working.
I did this for each user on the machine.
(Again, this is on the 10-month-old ubuntu 14.04 using the GNOME
window manager.  Fresh versions of ubuntu 14.04 don't have this
problem.)

I feel a bit foolish, but I hope this helps somebody.

Andrew

Original comment by jewett....@gmail.com on 19 Feb 2015 at 2:46

GoogleCodeExporter commented 9 years ago
Glad to see you solved your problem. If you ever find a way to reproduce it, 
let us know.

Original comment by stephe...@google.com on 19 Feb 2015 at 2:45