Archive for Posts Tagged ‘Shell Scripting’

20

Apr
2011
Comments Off on Force SSH to use password authentication

Force SSH to use password authentication

This is a simple but useful tip. I have a server where I do SSH public key authentication for SVN+SSH, but sometimes would like to just login to the site and get a command line. For those times, I use the following command to force password authentication even tough I have the correct identity file in my .ssh folder.
ssh -o PreferredAuthentications="password"  myUsername@myServerAddress
read more

28

Oct
2010
Comments Off on Add new files to SVN from the command line

Add new files to SVN from the command line

Here is a little tip for automating files that need to be added to SVN. First make sure you are in your project folder that is under source control. Then try the following:
svn status | grep -e ^?
With this you’ll notive that it will list the files, but its not in a format ready automatable. So lets enhance it:
svn status | grep -e ^? | awk '{print $2}'
This time we get a list of the files that need to be added, but lets take it a step further and also add the files to SVN in one step:
svn add `svn status | grep -e ^? | awk '{print $2}'`
There. Now all you have to do is commit. read more