Search code examples
pythontractracdhtdigest

tracd login Error


I am trying to use tracd but i cannot get past the authentication part. I created a digest file based on their wiki description:

admin:ITC:98e7d6e0a7506cd5558067794aed9cce

PS C:\Users\22193\AppData\Roaming\Python\Scripts> .\tracd.exe --port 8000 auth="Test_Trac,D:\TracEnv\conf\login2.digest,
ITC" D:\TracEnv
Server starting in PID 5948.
Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/
Using HTTP/1.1 protocol version
127.0.0.1 - - [28/Apr/2016 17:37:25] "GET /TracEnv HTTP/1.1" 200 -
127.0.0.1 - - [28/Apr/2016 17:37:25] "GET /TracEnv/chrome/site/your_project_logo.png HTTP/1.1" 404 -
127.0.0.1 - - [28/Apr/2016 17:37:26] "GET /TracEnv/chrome/site/your_project_logo.png HTTP/1.1" 404 -
127.0.0.1 - - [28/Apr/2016 17:37:27] "GET /TracEnv/login HTTP/1.1" 500 -
127.0.0.1 - - [28/Apr/2016 17:37:27] "GET /TracEnv/chrome/site/your_project_logo.png HTTP/1.1" 404 -

When i click on login i still get an authentication error. I used certutil in windows to generate the digest. What should be the first argument in the --auth option. In the documentation it mentions base project directory, but i did not create any separate project directory, i only created an environment (D:\TracEnv). What could be the problem here?

Update: I now get an error:

PS C:\Users\22193\AppData\Roaming\Python\Scripts> .\tracd.exe -s --port 8000 --auth="TracEnv,D:\TracEnv\conf\login2.htdi
gest,ITC" D:\TracEnv
Warning: found no users in realm: ITC
Server starting in PID 3296.
Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/

When i click on login it prompts for username and password but i cannot login with the user name and password i used to create the digest file. i think this is beacuse of no users in realm. How do i add users in realm?


Solution

  • The solution that worked for me is generating the digest file using htdigest.py instead of using Windows certutil. Even though the contents of both files (one generated by certutil and one by htdigest.py) when viewed in notepad++ are the same, tracd doesn't seem to work with the file generated by certutil. Maybe i'm missing something here but i couldn't figure out why this happens.