Struggling getting started

Following the Quick Start guide (Ubuntu 10.04)

$ knife client list
ERROR: OpenSSL::PKey::RSAError: private key needed.: no start line

$ ls -l /home/cwhite/chef-repo/.chef/
total 20
-rw-r–r-- 1 cwhite cwhite 526 2011-05-19 10:52 knife.rb
-rw-r–r-- 1 cwhite cwhite 426 2011-05-19 10:30 tti.pem
-rw-r–r-- 1 cwhite cwhite 1679 2011-05-19 10:30 tti-validator.pem
drwxr-xr-x 2 cwhite cwhite 4096 2011-05-19 13:26 unused
-rw-r–r-- 1 cwhite cwhite 426 2011-05-19 12:37 white_n_az.pem

seems like it should work but I don’t have a clue how to resolve this and Google wasn’t of much use here.

Anyone have a cluestick for this noob?


Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

RSA keys have a start line and and end line which looks something like
---------------------RSA PRIVATE KEY---------------

Did you, by any chance, remove these? If you look at the pem files do
they look okay? Are they correctly referenced in knife.rb?

Cheers,
Edward

On Thu, May 19, 2011 at 1:30 PM, Craig White craig.white@ttiltd.com wrote:

Following the Quick Start guide (Ubuntu 10.04)

$ knife client list
ERROR: OpenSSL::PKey::RSAError: private key needed.: no start line

$ ls -l /home/cwhite/chef-repo/.chef/
total 20
-rw-r--r-- 1 cwhite cwhite 526 2011-05-19 10:52 knife.rb
-rw-r--r-- 1 cwhite cwhite 426 2011-05-19 10:30 tti.pem
-rw-r--r-- 1 cwhite cwhite 1679 2011-05-19 10:30 tti-validator.pem
drwxr-xr-x 2 cwhite cwhite 4096 2011-05-19 13:26 unused
-rw-r--r-- 1 cwhite cwhite 426 2011-05-19 12:37 white_n_az.pem

seems like it should work but I don't have a clue how to resolve this and Google wasn't of much use here.

Anyone have a cluestick for this noob?

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

I think so...

$ cat ~/chef-repo/.chef/knife.rb
current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "white_n_az"
client_key "#{current_dir}/white_n_az.pem"
validation_client_name "tti-validator"
validation_key "#{current_dir}/tti-validator.pem"
chef_server_url "https://api.opscode.com/organizations/tti"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]

The 2 'pem' files referenced in knife.rb are indeed in the same .chef
directory and they both seem correct...

cwhite@ubuntu:~/chef-repo/.chef$ head -n 1 tti-validator.pem
-----BEGIN RSA PRIVATE KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ head -n 1 white_n_az.pem
-----BEGIN RSA PUBLIC KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ tail -n 1 tti-validator.pem
-----END RSA PRIVATE KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ tail -n 1 white_n_az.pem
-----END RSA PUBLIC KEY-----

On Thu, May 19, 2011 at 2:10 PM, Edward Sargisson esarge@pobox.com wrote:

RSA keys have a start line and and end line which looks something like
---------------------RSA PRIVATE KEY---------------

Did you, by any chance, remove these? If you look at the pem files do
they look okay? Are they correctly referenced in knife.rb?

Cheers,
Edward

On Thu, May 19, 2011 at 1:30 PM, Craig White craig.white@ttiltd.com
wrote:

Following the Quick Start guide (Ubuntu 10.04)

$ knife client list
ERROR: OpenSSL::PKey::RSAError: private key needed.: no start line

$ ls -l /home/cwhite/chef-repo/.chef/
total 20
-rw-r--r-- 1 cwhite cwhite 526 2011-05-19 10:52 knife.rb
-rw-r--r-- 1 cwhite cwhite 426 2011-05-19 10:30 tti.pem
-rw-r--r-- 1 cwhite cwhite 1679 2011-05-19 10:30 tti-validator.pem
drwxr-xr-x 2 cwhite cwhite 4096 2011-05-19 13:26 unused
-rw-r--r-- 1 cwhite cwhite 426 2011-05-19 12:37 white_n_az.pem

seems like it should work but I don't have a clue how to resolve this and
Google wasn't of much use here.

Anyone have a cluestick for this noob?

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your
desired success? Let us help!

On Thu, May 19, 2011 at 2:21 PM, Craig White craig.white@ttiltd.com wrote:

I think so...
$ cat ~/chef-repo/.chef/knife.rb
current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "white_n_az"
client_key "#{current_dir}/white_n_az.pem"
validation_client_name "tti-validator"
validation_key "#{current_dir}/tti-validator.pem"
chef_server_url "https://api.opscode.com/organizations/tti"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
The 2 'pem' files referenced in knife.rb are indeed in the same .chef
directory and they both seem correct...
cwhite@ubuntu:~/chef-repo/.chef$ head -n 1 tti-validator.pem
-----BEGIN RSA PRIVATE KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ head -n 1 white_n_az.pem
-----BEGIN RSA PUBLIC KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ tail -n 1 tti-validator.pem
-----END RSA PRIVATE KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ tail -n 1 white_n_az.pem
-----END RSA PUBLIC KEY-----

Your personal key should be a private key - where did the public key
white_n_az.pem come from?

If you're using the opscode platform, you likely need to re-generate
your personal key:

Adam

--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: adam@opscode.com

bingo - thanks

Craig

On Thu, May 19, 2011 at 2:26 PM, Adam Jacob adam@opscode.com wrote:

On Thu, May 19, 2011 at 2:21 PM, Craig White craig.white@ttiltd.com
wrote:

I think so...
$ cat ~/chef-repo/.chef/knife.rb
current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "white_n_az"
client_key "#{current_dir}/white_n_az.pem"
validation_client_name "tti-validator"
validation_key "#{current_dir}/tti-validator.pem"
chef_server_url "https://api.opscode.com/organizations/tti"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
The 2 'pem' files referenced in knife.rb are indeed in the same .chef
directory and they both seem correct...
cwhite@ubuntu:~/chef-repo/.chef$ head -n 1 tti-validator.pem
-----BEGIN RSA PRIVATE KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ head -n 1 white_n_az.pem
-----BEGIN RSA PUBLIC KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ tail -n 1 tti-validator.pem
-----END RSA PRIVATE KEY-----
cwhite@ubuntu:~/chef-repo/.chef$ tail -n 1 white_n_az.pem
-----END RSA PUBLIC KEY-----

Your personal key should be a private key - where did the public key
white_n_az.pem come from?

If you're using the opscode platform, you likely need to re-generate
your personal key:

Chef Support for Automation & DevOps | Chef

Adam

--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: adam@opscode.com