Showing posts from December, 2014

Git authentication for automation script

Git authentication When you write some kind of automation (script) which needs to interact with git and clone/pull data and perform some action. And if its behind authentication layer then you need a way to automate the authentication that can let you pass credentials and automation can run without any interruption. Either you can use ssh keys to authentication and use git@ URL to access your git repo. But if you want to access (or force to) git via https URL you need to pass credential explicitly. There are 2 ways to achieve this task for http protocol.

Logrotate setup

How to setup logrotate There are several applications which do not have in build capability to rotate the logs and purge the old logs. Lets take example of apache, You may need to rotate its log and purge old one and zip the current one. It's not possible to truncate the apache log when its running, You will need to handle in via logotate command. Here is the way you can setup logrotate for an application. Here I am taking example of apache, You can change it as per your need