Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Saturday, 13 August 2016

Frustrating experience with AWS Beanstalk

I have used Azure's Paas services before. For a friend's website, I was trying out AWS's Paas offering today. The experience is nothing less than just frustrating. I have a fully functioning rails application. It is working fine locally. However, when I tried to upload the application using the beanstalk command line, I am seeing the following error.

ERROR: [Instance: i-002808929ac3e534b] Command failed on instance. Return code: 1 Output: (TRUNCATED)...SyntaxError: Invalid CSS after "": expected selector or at-rule, was "{"
(sass):1
/opt/rubies/ruby-2.3.1/bin/bundle:23:in `load'
/opt/rubies/ruby-2.3.1/bin/bundle:23:in `
'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace).
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.


Now the complete log is not available here. You need to log into the instance and check it. However, as the lines show, it is a problem with asset pre-compilation. I tried running asset compilation locally; but I do not see this error. Interestingly, the instance created by the CLI did not allow permission for SSH. It's acceptable source was set to some other IP. It seems to me they launched their product in a hurry.

Friday, 27 April 2012

Using multiple keys for github

Recently, I was working from my office laptop. I had set up ssh keys for Github on that system. However, when I had to work from my personal system, I realized that I don't have those ssh keys with me on this system. Also, the ssh keys on the current system were used for another purpose. So, I decided to have multiple keys on Github as well as on my system. I created my new keys with the following command:

ssh-keygen -t <rsa/dsa as per your choice> -f <new private key file like ~/.ssh/id_dsa.github> -C "comment"

This created a new key pair for me. Now, I had to configure ssh to use this key for github. So, I added the following lines to ~/.ssh/config file.

Host github.com
IdentityFile ~/.ssh/id_dsa.github
User git


Now, I had to add this new key to my ssh keys on Github. I opened the new public key file (id_dsa.github.pub in the above case) and copied its contents to add a new key on Github. I tried ssh -vT git@github.com and verified that it was using the new key and I was able to access Github successfully.

OpenSSH_5.9p1, OpenSSL 1.0.0g 18 Jan 2012
debug1: Reading configuration data /home/me/.ssh/config
debug1: /home/me/.ssh/config line 9: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/me/.ssh/id_dsa.github type 1
debug1: identity file /home/me/.ssh/id_dsa.github-cert type -1