SSH auth for multiple GitHub accounts on OSX

When you use more than one SSH key to access GitHub you can use primary account by default and additional, with such a config (assume your second SSH key file is ~/.ssh/id_rsa_pewpew)

Host github-pewpew
  HostName github.com
  IdentityFile ~/.ssh/id_rsa_pewpew

With Linux having ssh key in .ssh folder and configuring ~/.ssh/configis enough. But on MacOS I get an error during Git clone (and Capistrano deploy) like this:

git clone git@github-pewpew:.../...git
Cloning into 'MyRepo'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

a bit confusing, but an error is not with Repo by itself (if you are completely sure that you are the repo owner or have write-rights).

Solution

On MacOS X I need to additional keys manually by

$ ssh-add ~/.ssh/id_rsa_pewpew

and you can check what key are in use right now

$ ssh-add -l

Note

On MacOS X you will need to add key after every system restart. It looks like we need to use OSX Keychain to reload them authomatically via

$ ssh-add -K [path/to/private SSH key]


Fix issues with Ruby installation (via rvm) in Ubuntu 15.10

ruby Got an error while trying to install Ruby via RVM and RBENV on Ubuntu 15.10.

compiling ossl_ssl.c
ossl_ssl.c:141:27: error: ‘SSLv3_method’ undeclared here (not in a function)
     OSSL_SSL_METHOD_ENTRY(SSLv3),
...
Makefile:293: recipe for target 'ossl_ssl.o' failed
make[2]: *** [ossl_ssl.o] Error 1
...
exts.mk:201: recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
...
make: *** [build-ext] Error 2

Solution #1

Apply patch during installation

curl -fsSL https://gist.github.com/mislav/055441129184a1512bb5.txt | rbenv install --patch 2.2.3

Read more ...

How to install Elance Tracker in Ubuntu 15.04, 15.10

Elance Tracker

My previuos post explained how to install Elance Tracker on Ubuntu 13.10 - 14.10, but from 15.04 libgnome-keyring version is changed. This is updated version of the installation script.

  • Here is one quick script. Save it as install_adobe_air.sh
#!/bin/bash
apt-get install -y libgtk2.0-0:i386 libstdc++6:i386 libnss3-1d:i386 lib32nss-mdns libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386
cd /tmp
apt-get download libgnome-keyring0:i386
dpkg-deb -R libgnome-keyring0_3.12.0-1build1_i386.deb gnome-keyring
cp gnome-keyring/usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/i386-linux-gnu/
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/i386-linux-gnu/libgnome-keyring.so.0
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0
wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin -O  /tmp/AdobeAIRInstaller.bin -q
chmod a+x /tmp/AdobeAIRInstaller.bin
/tmp/AdobeAIRInstaller.bin -silent
rm ./AdobeAIRInstaller.bin
rm /usr/lib/libgnome-keyring.so.0
rm /usr/lib/libgnome-keyring.so.0.2.0
  • Make it executable sudo chmod a+x install_adobe_air.sh
  • And run sudo ./install_adobe_air.sh (during running Abode Air wizard will appera, you should go through it)
  • Then download Elance Tracker for Linux as usual and install it in normal way

Read more ...

Solution : Skype stays always online - issue due to "cloud chats"

skype

Long story short, I was told that my Skype account is online even when I am totally sure it is not. Couple monthes I was living with that issue, while I've got some time to make an investigation

According to Skype forums this issues appeared with introdution of "cloud chats" (and new client apps, when all old clients "were banned"). Cloud chats from some clients by some means "keep your online status". In my case it was a online sessions from my Android Skype client.

Solution

Go in chat with anyone (doesn't matter who) and type this command:

/showplaces

(it this shows all your current "online" session, for me it was 3 of them !)
If you see more than one session there, then type

/remotelogout

it will logout all sessions except current one.


Ansible 1.6.7+ issue : quote variables with equal signs

I have noticed that on Ansible 1.6.10 my old stable playbooks are not working. It shows an error :
A variable inserted a new parameter into the module args. Be sure to quote variables if they contain equal signs (for example: "{{var}}").

There is a huge conversation on GitHub around different appearances of this isssue.

Solutinon

  • Rollback to Ansible <= 1.6.6 (you can find .deb packages here).
  • Or change your playbook and ad quotes around all shell string that contain "=" sign (atleast I've got such understanding while searchin the solution).

It appears that you can't do something like this now (combine actual shell command and some shell module arguments like creates)

    - name: Configure ZSH (Install oh-my-zsh)
      shell: "{{ item }}"
      with_items:
        - creates='/home/vagrant/.oh-my-zsh' su - vagrant -c 'wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh'
        - sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="jreese"/' /home/vagrant/.zshrc

So with_items now strictly for typical operations with same "template". And in case like above we will need to write separate task for each step (yes I agree that was a mess doing like that... but I liked it for a quick Shell -> Ansible convertation).


Read more ...
Ievgen
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management

Notes


Skaffold tool that facilitates continuous development for Kubernetes-native applications. Continuously deploys to your local or remote Kubernetes cluster.



DoItLive is a tool for live presentations in the terminal. It reads a file of shell commands and replays the commands in a fake terminal session as you type random characters.