Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
POKEMAN SAM
Jul 8, 2004

jayhat posted:

Just want to know one thing - is there any reason why perforce costs so much?
I've never had a chance to try using it, but it better do something special to cost so much when up against so many awesome, free alternatives.

Perforce really is great. I mean, it's intuitive enough for non-programmers to use without screwing anything up, has a multitude of options to help with huge repositories (like flagging a file such that you only want to keep the last 3 revisions for large binaries and such) has an API that you can use to quickly get Perforce functionality into your applications, and a whole lot more.

I didn't know how great Perforce was until I spent 3 years using it, and there are still some pretty cool features that I learn about once in a while.

Also it's free for 2 users, so it works great for personal projects as well.

Adbot
ADBOT LOVES YOU

POKEMAN SAM
Jul 8, 2004

No Safe Word posted:

How the hell did I not think of this before?

Because syncing 'to the cloud' is only one advantage of a (good) version control system?

POKEMAN SAM
Jul 8, 2004
I've got a repo on GitHub that I'm trying to get to automatically deploy to my webserver (VPS) whenever a change is pushed to master. Right now I have it such that GitHub fires off an HTTP request to a PHP script on my web server that is supposed to do a git pull, but the git pull fails silently (and I'm not sure why).

I've tried quite a few things that I've seen online to figure it out, to no avail. PHP, according to shell execing 'whoami', runs as the www-data user. I created a new group 'gitwriters', added myself and www-data to that group, changed the owning group of all of the files in the git repo directory to that group, gave that group permissions, and set the setgid bit on the files in it. After doing that, when I do a sudo -u www-data git pull it gave me a SSH key/permission error, so I created a RSA key pair for the www-data user. Now when I run git pull as www-data it works fine, but when I run it via the PHP script it fails silently still. I've verified that I'm in the right directory, but I'm not sure what else to try now.

Edit: Apparently PHP's shell_exec doesn't automatically grab stderr, so I found this when I piped stderr to stdout and ran the PHP script: cannot open .git/FETCH_HEAD: Permission denied

Edit 2: Changing the owner of all of the files to the www-data user fixed it, but I think there should probably be a better way, considering www-data is in the right group (and it worked when I sudo'd git pull as the www-data user...)

POKEMAN SAM fucked around with this message at 15:22 on Apr 26, 2011

POKEMAN SAM
Jul 8, 2004

epswing posted:

You're kind of guessing what's wrong and trying different things. When you say the PHP script "fails silently"...is it 500'ing? If so, what does the web server's error.log say? If not, wrap the whole thing in try/catch and write the $exception to a file or something.

Sorry, I meant I was writing the results of shell_exec to the page, and that returned nothing. Obviously if it were failing somehow else I'd know better how to track it down...

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply