Sunday, December 29, 2013

GitLab SSH

GitLab HELP instructions on how to connect GitLab with SSH seems not to be 100% complete.
What it mentions is:

SSH Keys

SSH key allows you to establish a secure connection between your computer and GitLab
To generate a new SSH key just open your terminal and use code below. 

ssh-keygen -t rsa -C ""
# Creates a new ssh key using the provided email
# Generating public/private rsa key pair...
Next just use code below to dump your public key and add to GitLab SSH Keys 

cat ~/.ssh/
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
When I tried this and uploaded public RSA key to my GitLab profile i still got error when trying 'git push':

Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.

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

So i read somewhere that missing part is to execute:

ssh-add ~/.ssh/id_rsa

Now SSH connection works fine.

Sunday, December 22, 2013

Raspbmc home media center

Most of recent TV sets are already packed with bunch of hi-tech stuff that change the way we perceive watching TV. In the past we were bound to a range of channels, even though having satelite at home gave us quite a wide rande of it - counted in hundreds. The Internet added completely new possibilities. Almost every TV available today  has internet connectivity. We do not any longer have to stick to what is beeing broadcasted but we choose ourselves what to watch and when.

What if you have an old TV without RJ45 socket or WiFi? Do you have to buy special subscription or decoders to access a large entertainment centers?
No, you can have it all for free with Raspberry Pi.

All you need to do is download Raspbmc Linux image and put it on SD card, which you then insert to Raspberry Pi.
Then you plug Raspberry Pi to internet - Raspbmc has DHCP configured by default so it will boot and start setup automatically after you tun it on.
Then you also plug it to TV with HDMI cable and watch things happen. I don't have a keyboard, how to steer my new media centre?
XBMC offers a few possibilities of remote control.
I found Yatse on my Andorid smart phone the easiest way.

You can then add audio and video plugins that allow you to watch or listen to various media channels, search through Youtube or Vimeo and many, many others...

Still don't forget you have a small computer on board so you can do other stuff with it, program, setup webserver, etc. If you'd like to connect to it even for such a prosaic thing as uploading some files, you can access it through SSH.

Here's a good tutorial how to do it.

E.g. to upload file to /tmp folder on Pi:
scp file.mp4 pi@

The default pi password is raspberry

If you want you can configure WiFi on Raspbmc like this.

You can also play with XBMC and try extending it with new features. Have a look at development tutorials here.

If you'd like to have access to media channels in your local language, like me in Polish, you'd probably find some plugins for your language in the web. I found some for mine.

Have fun !