Read-only access to the sudo source repository (from as far back as 1993) is available for checkout using mercurial or git. Anonymous CVS access is no longer available.
To download a copy of the repo you must first install mercurial. You can then make a clone of the repo by running:
hg clone https://www.sudo.ws/repos/sudo
This will create a copy of the sudo repo on your local machine in the sudo directory. This step only needs to be done once.
By default, this will check out the tip of the main development branch. To check out a copy of the sudo 1.9 source files, change to the sudo directory that you just created and run:
cd sudo hg update 1.9
This will populate the sudo directory with the sudo source files for the tip of the sudo 1.9 branch.
If you want to checkout a specific version of sudo, you can use the symbolic tag for that release. For example, to check out sudo version 1.9.0 you would do:
hg update SUDO_1_9_0
Once you have the source tree checked out, you can update it thusly:
cd sudo hg pull hg update
The hg pull will pull in changes from the master repo, the hg update will update the working copy from your local repo. This can be done in a single step with hg pull -u which will pull in changes and update the working copy.
You can also do standard operations like log, diff, and annotate. While you can check in changes to your local copy of the repo, you will be unable to push the changes directly upstream. Changes may be submitted in the form of patches or change bundles.
If you are new to mercurial, the mercurial guide is a good place to start.
To download a copy of the repo you must first install git. You can then make a clone of the repo by running:
git clone https://github.com/sudo-project/sudo.git
This will create a copy of the sudo repo on your local machine in the sudo directory. This step only needs to be done once.
By default, this will check out the tip of the main development branch. To check out a copy of the sudo 1.9 source files, change to the sudo directory that you just created and run:
cd sudo git checkout sudo-1.9
This will populate the sudo directory with the sudo source files for the tip of the sudo 1.9 branch.
If you want to checkout a specific version of sudo, you can use the symbolic tag for that release. For example, to check out sudo version 1.9.0 you would do:
git checkout SUDO_1_9_0
Once you have the source tree checked out, you can update it thusly:
cd sudo git pull
This will pull in changes from the master repo and merge them into your local repo. To fetch upstream changes without merging them or updating the local copy, use:
cd sudo git fetch
You can also do standard operations like log, diff, and annotate. While you can check in changes to your local copy of the repo, you will be unable to push the changes directly upstream. Changes may be submitted in the form of pull requests.
If you are new to git, the Git Handbook is a good place to start.