akeyes.co.uk - A+ on SSLLabs

Posted: 2015-07-06 15:55:23 by Alasdair Keyes

Direct Link | RSS feed


SSL Labs SSL Test now scores https://akeyes.co.uk an A+ - See here


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

Jenkins repository errors with SSH and git

Posted: 2015-07-06 11:04:23 by Alasdair Keyes

Direct Link | RSS feed


I've been experimenting with Jenkins continuous integration (CI) suite.

CI seems to be getting widely adopted in businesses so I thought it would be good to familiarise myself with it.

I created a git repo with SSH/key pair access and created a new project in Jenkins. In the project configuration, I was able to connect to the repository with the following URL

ssh://git@X.X.X.X:/home/git/repo/test1.git/

But all my builds were failing with the following message...

Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/test1/workspace
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url ssh:///git@X.X.X.X:/home/git/repo/test1.git/ # timeout=10
Fetching upstream changes from ssh:///git@X.X.X.X:/home/git/repo/test1.git/
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress ssh:///git@X.X.X.X:/home/git/repo/test1.git/ +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh:///git@X.X.X.X:/home/git/repo/test1.git/
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress ssh:///git@X.X.X.X:/home/git/repo/test1.git/ +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: ssh: Could not resolve hostname : Name or service not known
fatal: Could not read from remote repository.

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

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

Eventually, I noticed that the URL that was being connected during the build had an extra / in the ssh protocol definition.

It turns out that the git pluging does some escaping and ends up adding the extra /, although the Git URL is perfectly valid, it is a sloppy url as the SSH port is not explicitly defined. Change it to

ssh://git@X.X.X.X:22/home/git/repo/test1.git/

And it worked with no issues and proceeded to running the build/test scripts.


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

imapsync

Posted: 2014-07-25 10:46:27 by Alasdair Keyes

Direct Link | RSS feed


I'm in the middle of migrating systems at the moment, part of which involves migrating mailboxes between seperate systems, the source system is using Maildir format mailbox and the destination is using Cyrus, so I'm unable to just copy the files from the filesystem.

Both have IMAP access so I can use the fantastic imapsync util to help http://imapsync.lamiral.info/. I hadn't come across it before, but if you want a basic sync of mailboxes, the following will do what you want. Obviously, use IMAPS as there's no reason not to..

imapsync 
    --host1 srchost.com --port1 993 --user1 dstuser --password1 pass1 
    --host2 dsthost.com --port2 993 --user2 srcuser --password2 pass2 
    --pidfile '/tmp/email@domain.com-imapsync.pid' 
    --nofoldersizes 
    --noreleasecheck 
    --subscribe_all 
    --delete2 
    --ssl1 
    --ssl2 
    --addheader

If you every need to perform any kind of migration, this will make your life a lot easier.


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

Sysadmin Appreciation Day

Posted: 2014-07-17 10:49:38 by Alasdair Keyes

Direct Link | RSS feed


The day will be here soon, appreciate your sysadmins for the hard work they do to make sure you can keep doing your work.

http://sysadminday.com/


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

JSON Resume

Posted: 2014-07-07 17:20:41 by Alasdair Keyes

Direct Link | RSS feed


Viewing Hacker News today, I saw a new project called JSON Resume.

JSON Resume is community driven open source initiative to create a JSON based standard for résumés. This is something I'd never thought about before, but is something that is in drastic need of standardisation.

Before the days of online recruitment and Digital CVs, a non-standard CV was a good thing. It let you stand out from the crown in a big pile of paper, drawing the eye of the recruiter.

Nowdays the opposite is almost true, you want your CV online and searchable by the largest amount of people, a complex or fancy CV might do you more harm than good. Many agencies will auto convert Word Document or PDF files into text that they can send out to prospective employers, but this would be even better if there were an overall standard format that could be used for everyone and easily searchable by recruiters and employers.

It has the benefit that the style can be separated from the content. Similar to the idea of CSS and HTML.

The project is in it's infancy and the specification is still a work in progress and will most definitely change in the near future, but I think it's worth supporting. To that end, please see my CV in JSON format


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

.uk Released

Posted: 2014-06-11 13:24:29 by Alasdair Keyes

Direct Link | RSS feed


Over the past few months many more TLDs have been released (Such as .wtf .ninja etc) and today the new UK TLD .uk was released.

This seems to have taken off in a big way, much more interest from customers than I'd expected. So, make sure you buy your .uk domain!

If you own the .co.uk, the .uk version has been reserved for you for 5 years, if you don't know where to register your domains, try Daily.co.uk


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

Interactive Git Tutorial

Posted: 2014-05-09 09:34:29 by Alasdair Keyes

Direct Link | RSS feed


Useful tool if you're starting out with Git Version Control

https://try.github.io/levels/1/challenges/1


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

Checking git repo integrity

Posted: 2014-04-08 16:31:03 by Alasdair Keyes

Direct Link | RSS feed


I was merging in code changes to my Dev VM this afternoon and I hit a rather nasty issue; I ran out of space on the virtual disk....

It wasn't difficult to sort the space issue, I created another disk in vmware and added it into the VM and used LVM/resizefs to increase the space available to the filesystem at which point I had plenty of space left to play with (I love LVM!).

Git status showed a list of modified files under the "Changes not staged for commit" section and a git diff off these files showed that they all had their content removed.

Not knowing what to do with my repo, I reversed the changed files with

$ git checkout -- file1 file2 ...

And then just merged in the chages again, this appeared to work but I wanted to be sure that nothing else had broken deeper in git.

I discovered the 'git fsck' command which took about 5 minutes to run and didn't show up any errors.

$ git fsck --full --strict 
$

All looks good. A useful command to remember.


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

Critical OpenSSL Vulnerability

Posted: 2014-04-07 20:34:35 by Alasdair Keyes

Direct Link | RSS feed


If you're a sysad, you have no doubt already heard of the recent Heartbleed OpenSSL vulnerability. I won't rehash the details, but they can be seen on the links below. Just a reminder to make sure you update your systems, I can imagine that in a short period of time, people will be scanning systems to try and abuse it.

www.openssl.org/news/secadv_20140407.txt

http://arstechnica.com/security/2014/04/critical-crypto-bug-in-openssl-opens-two-thirds-of-the-web-to-eavesdropping/


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

Digital Ocean Articles

Posted: 2014-04-03 23:52:22 by Alasdair Keyes

Direct Link | RSS feed


Digital Ocean seem to be the new darlings of the Cloud world, and for good reason, their servers are great value for money with good performance. I'm looking to upgrade my VPS soon and I will be strongly considering one of their VMs.

One other thing that have made me respect them are their incredibly useful tech articles. I've recently been looking at MySQL clustering for a project I'm working on that could grow and need to scale. I came across MariaDB's Galera tool, which looks to be a good starting point for me.

The next question was how to set it up... never fear Digital Ocean had a clear and concise article on how to do it https://www.digitalocean.com/community/articles/how-to-configure-a-galera-cluster-with-mariadb-on-ubuntu-12-04-servers, what more could you want?

Have a read through their articles, you'll probably learn stuff you didn't even know you wanted to learn.


If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz

IT Consultancy Services

I'm now available for IT consultancy and software development services - Cloudee LTD.