MySQL Project
Hello world! A blog about programming, eating and surviving as a student in the Big Apple.
This year's problems for the ICPC:
Labels: code, linux, nothing_useful
Now that we can log in automatically (SVN Part 1), we can do some cool stuff. This summer I managed a SVN server for a company that has multiple programs, each of which had different developers working on them. Each of these programs is stored as a repository in SVN. For example, developer A needs access to repository 1 and 2 and developer B needs access to repository 1 and 3, etc. To make it even trickier, in repository 1, developer A should have access to the entire repository, while developer B should only have access to the directory devB in repository 1. Also, every time a developer makes a change to a file, the change needs to be logged with their username.
/usr/bin/svnserver/repository1 is owned by user repo1, /usr/bin/svnserver/repository2 by repo2, etc. Put any developer who needs access to [repo]'s RSA pubkey in the /home/[repo]/.ssh/authorized_keys file, where [repo] is the name of the repository's owner (repo1, repo2). Configure authorized_keys like:command="/usr/bin/svnserve -t -r /var/svn/ --tunnel-user=[developer's username]",no-port-forwarding,no-pty,no-agent-forwarding,no-X11-forwarding ssh-rsa [developer's RSA pubkey]== [developer's username][repository] using: svn+ssh://[repo]@[server]/[repository]. While we are sending the information over SSH, the developer does not have a SSH account and can do nothing but use SVN to check out (svn co) and update (svn ci) repositories owned by a user (repo1, repo2) whose authorized_keys file contains the developer's pubkey. The last column in the authorized_keys file is the comment line. SVN automatically uses this line as the comment when a developer commits code to the SVN repository.Subversion is another awesome piece of software for keeping files in sync across multiple computers. Not quite suited for backing up pictures or anything like that -- but hey, its great for big coding projects! Usually with big projects, there are different levels of access. For example, Bob's algorithm may be super secret and only he and Bill should be able to see the code for it. But, Barry may be logging in to the same SVN server and need access to other code. There's an app for that. I mean, there's a feature for that. Also, perhaps not everyone should have access to the server's file, or even an account on the server. Well, there's a feature for that, too. Anyway, here's the procedure/setup I came up with after lots of research/trial-and-(hopefully not catastrophic) error.
sh-keygen -t rsarsync -a ~/.ssh/id_rsa.pub server:~/.ssh//etc/ssh/ssh_config, add:Host [server]
Port [port #]
Host * [this line should be there already, it just tells you where to put the 2 preceeding lines]ssh over to the server and:cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
rm ~/.ssh/id_rsa.pubhttp://drupal.org/handbook/customization/tutorials/beginners-cookbook
Labels: code, nothing_useful, software
For as much as Apple and Google are in bed together, the way the iPhone sets up gmail by default kinda sucks. So here's a better way (from Google):
Labels: iPhone