2

1

I see that I have a cookie file in my home directory under _hgcookies:

     # Netscape HTTP Cookie File
     # http://www.netscape.com/newsref/std/cookie_spec.html
     # This is a generated file!  Do not edit.

fogbugz.accidentalhacker.com    FALSE   /   FALSE       DBID    
fogbugz.accidentalhacker.com    FALSE   /   FALSE       fSetNewFogBugzAuthCookie    1
fogbugz.accidentalhacker.com    FALSE   /   FALSE       fbToken 6hsasdg0sdgh6qjfcd8pgZiqmv2 

(Note: token value has been changed to protect the innocent)

If I do hg logout and try again, I get the same result. I also tried manually deleting the cookie file; it gets re-created. This happens for everyone who uses our Kiln instance, so it's probably not machine specific.

flag

1 Answer

2

It looks like your cookie file is incomplete. You're missing a value for DBID.

FogBugz database

  1. In your FogBugz database, make sure there's a sKilnSecurityToken in the PluginKeyValue table:

    SELECT * FROM PluginKeyValue WHERE sKey = 'sKilnSecurityToken'

  2. If the above query returned a single row you're done with the FogBugz database; move on to the Kiln section below. If it didn't return a row, you'll need to add one. First, find the ixPlugin of the Kiln plugin:

    SELECT * FROM Plugin

  3. Use the ixPlugin value you obtained above for the next statement:

    INSERT INTO PluginKeyValue (ixPlugin, sKey, sValue) VALUES ([ixPlugin_from_above], 'sKilnSecurityToken', '[somestring]')

    The sValue that you use can be any string -- just remember what you used because you'll need it later.

  4. Now find the FogBugz database's DBID and remember it:

    SELECT * FROM ID

Kiln database

  1. Check for the sKilnSecurityToken and sDBID values in your Setting table:

    SELECT * FROM Setting WHERE sKey IN ('sDBID', 'sKilnSecurityToken')

  2. If the above query returned two rows, and they match the values from the FogBugz database, you should be good to go. Otherwise, you need to create them using the values from FogBugz:

    INSERT INTO Setting (sKey, sValue) VALUES ('sKilnSecurityToken', '[somestring]')

    INSERT INTO Setting (sKey, sValue) VALUES ('sDBID', '[DBID_from_FogBugz]')

Once the two databases are sychronized with respect to the DBID and security token, you should be able to use KilnAuth successfully and your cookie file should contain 5 valid key/value pairs.

You can test that the two applications can now synchronize by going to this URL: http://yourfogbugzurl/kiln/fogbugz/forcesync You should get a date and time back as the response.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.