Tuesday, 20 May 2014

Git checkout error: Unable to unlink 'plugins/...'

Had a strange git error today when finishing a GitFlow release on my PhoneGap/Cordova app. It was occurring when it seemingly tried to checkout master, and then would fail, leaving a whole heap of dirty unfinished work in my develop branch.

So I hard-reset the dev branch and attempted to checkout master manually. Same error - 'unable to unlink' and then lots of references to a certain geolocation plugin in the /plugins/ dir. Looking in detail at this directory it was clear that it had different ownership to all the other dirs. Everything else was owend by edpitt, but this was owned by 'root', for some unknown reason. So I ran a 'sudo chown -R edpitt /plugins/org.apache.cordova.geolocation' to turn it back to the correct ownership.

Once this was complete I was able to checkout master with no errors, and so attempting a GitFlow release this time proved successful.

No comments:

Post a comment

Comments are moderated, so you'll have to wait a little bit before they appear!