Edgewall Software

Changes between Version 238 and Version 239 of TracOnWindows


Ignore:
Timestamp:
Jun 1, 2008, 12:37:18 AM (16 years ago)
Author:
anonymous
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracOnWindows

    v238 v239  
    287287Open your browser to http://localhost:8000 to test out your new Trac project. You should see the title "Welcome to Trac 0.11b2" in your browser, and in the command window from which you just launched '''tracd''' there will be a series of status log messages. These messages will continue to update as you move around the Trac site. When you are done, return to the command window from which you launched tracd and press Ctrl+Break to stop tracd.
    288288
     289
     290=== Creating authentication with tracd on Windows (Standalone) ===
     291
     292If you are running tracd without Apache, you can use this simple Python script to generate your passwords for tracd.  Copy the contents below into a new file called 'C:\Python25\scripts\trac-digest.py'.
     293
     294{{{
     295#!python
     296from optparse import OptionParser
     297import md5
     298
     299# build the options
     300usage = "usage: %prog [options]"
     301parser = OptionParser(usage=usage)
     302parser.add_option("-u", "--username",action="store", dest="username", type = "string",
     303                  help="the username for whom to generate a password")
     304parser.add_option("-p", "--password",action="store", dest="password", type = "string",
     305                  help="the password to use")
     306(options, args) = parser.parse_args()
     307
     308# check options
     309if (options.username is None) or (options.password is None):
     310   parser.error("You must supply both the username and password")
     311   
     312# Generate the string to enter into the htdigest file
     313realm = 'trac'
     314kd = lambda x: md5.md5(':'.join(x)).hexdigest()
     315print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
     316}}}
     317
     318You can create a new password file, or add new users to the file, by executing this command from the command line:
     319{{{
     320C:\Python25\Scripts\trac-digest.py -u "My User Name" -p my@user@password >> C:\projects\passwords.txt
     321}}}
     322
     323To start tracd with authentication, execute this command from the command line:
     324{{{
     325C:\Python25\Scripts\tracd-script.py -p 8000 --auth=dev,C:\projects\passwords.txt,trac c:\projects\trac\my-project
     326}}}
     327
    289328== Troubleshooting ==
    290329