Couch Potato & git

Hi,

Does anyone know how to overcome this problem:

[potato.core._base.updater] Failed updating via GIT: Traceback (most recent call last):
  File "/mnt/DroboFS/Shares/DroboApps/couchpotato/app/couchpotato/core/_base/updater/main.py", line 182, in doUpdate
    self.repo.saveStash()
  File "/mnt/DroboFS/Shares/DroboApps/couchpotato/app/libs/git/repository.py", line 427, in saveStash
    self._executeGitCommandAssertSuccess(command)
  File "/mnt/DroboFS/Shares/DroboApps/couchpotato/app/libs/git/repository.py", line 85, in _executeGitCommandAssertSuccess
    raise GitCommandFailedException(kwargs.get('cwd', self._getWorkingDirectory()), command, returned)
GitCommandFailedException: GitCommandFailedException: Command 'stash save' failed in /mnt/DroboFS/Shares/DroboApps/couchpotato/app (1):

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'couchpot@Drobo.(none)')
Cannot save the current index state

I have run:

git config --global user.email "you@example.com" git config --global user.name "Your Name"

in a ssh terminal with my own values, but still get this error when trying to update Couch Potato via the webinterface…

Hmm, did you run the git config command as the couchpot user? If you are running it as root, it does explain the behavior since when couchpotato is running it won’t be able to access that information.

You could try something like this (as root):

cd /mnt/DroboFS/Shares/DroboApps/couchpotato/app
su couchpot -s /bin/sh -c "cd `pwd`; git config user.email \"you@example.com\""
su couchpot -s /bin/sh -c "cd `pwd`; git config user.name \"Your Name\""

Keep in mind that this did not happen to me at all. In fact, I don’t even have those values defined. This means that the problem is probably somewhere else. In this particular case it looks like git detected some changes in the app folder, and is trying to preventing you from losing them by issuing a ‘stash save’ call. That call requires a user name and email.

My actual advice to you is to make sure you are not changing the source code of CouchPotato, and discard any changes that you may have accidentally done with a command like this (as root):

cd /mnt/DroboFS/Shares/DroboApps/couchpotato/app
su couchpot -s /bin/sh -c "cd `pwd`; git checkout -f"

After this the git updates should work.

Thanks. I get

# su couchpot -s /bin/sh -c "cd `pwd`; git checkout -f" su: unknown user couchpot

I am no way familiar with git in general, however I’m assuming I now have to create a git user “couchpot”?

If so how would I got about it? I did some googling and came up with some stuff for git server, but I am unsure it this is correct.

This is weird. The service.sh script should have created the couchpot user for you, since couchpot runs under that account. Did you change service.sh?

My mistake, I disabled the app, and forgot to re-enable it. It accepts the command just fine now. Will check now to see if it works within the app.

Thanks again!

I was just getting this error too, glad I found this. I was modifying source code to try to implement some fixes/updates before they were committed. Glad there is an easy way back.

Can anyone tell me how to update couchpotato from the command line. It does not seem to be working from the ui. On the “About this Couchpotato” settings page it says version is undefined and updater is undefined , master. I was thinking that maybe updating from the command line might give it a jump start.

Thanks,
Adam

Suprising to me, I got home from work today and opened CP on my browser and was met with a new version. Apparently it decided to update today and now reads with a version number and all looks as I would expect it to.

Still curious about how to update from a command line if I ever had to.

Thanks everyone.
Adam

What I do to update via command prompt is get to the DroboApps/Couchpotato directory and type the following commands

rm -rf app
git clone git://github.com/RuudBurger/CouchPotatoServer.git app

What that does is removes the application but keeps the data directory. It then pulls down the current version and installs in app.

-XE