P2D3::Button "Clone A Repository" is not saving passwords

Create issue
Issue #204 resolved
Sarkazein created an issue

I cannot get MacHG to save passwords in any of my server configs. I can get the connection test to say it's successful, but whenever I click on "Add and Clone", the bookmark shows up in the sidebar, but the add repo window doesn't go away, and the bookmark doesn't have a password set.

I've read the manual/wiki pages on setting up connections with passwords, and that hasn't helped. I've tried to manually add the username and password to the connection URL and they keep getting stripped out and put into the username and password fields, but the password still isn't being saved. Also, just like the problem with the window not going away when creating a connection, I also can't get the edit-connection window to go away without hitting cancel.

Comments (23)

  1. Jason Harris repo owner
    • changed status to open

    First thanks for the report...

    You are using MacHg 0.9.15 right?

    It appears that the button "Clone A Repository" on the backing sheet now has problems as a result of my latest changes in MacHg 0.9.15.

    Can I get you to confirm that doing that first using the standard menu item: Repository > Add Server Repository.... then filling in the details and clicking ok. Then select this server and choose menu Repository > Clone. Ie do the server addition and then the clone in to separate steps. This should work for you.

    I'll fi the "Clone A Repository" in the backing sheet button shortly and release a new version...

    Thanks! Jas

  2. Sarkazein reporter


    Yep, I am using 0.9.15. Actually, I downloaded it today. Also, I'm running OSX 10.6.6.

    I tried the steps you listed there (add server, then clone) but the result was still the same. I've attached screenshots. The server validates in the create dialog (Create.png), but when I hit "add Server" the bookmark appears in the left sidebar but the create dialog doesn't go away. I hit cancel, and tried connecting using the bookmark, but it gives me the "Requires http authentication" error. I opened the edit connection window and there's no password saved (Edit.png).

    I wonder if it's having trouble talking to Keychain Access? I haven't had it ask me about Keychain Access yet, or requesting to use a stored password or anything. I tried doing a permissions repair on my drive, but that didn't help either.

  3. Jason Harris repo owner

    Ahh that is weird. Can we set up a ichat session so I can see this live? My email is jason@jasonfharris.com... Thanks, Jas

  4. Jason Harris repo owner

    Oppss... Scratch that... I can actually reproduce this... Its a really bad bug... Fixing now...

  5. Jason Harris repo owner

    Fixed in c2604f6fefbf .

    I released a new version MacHg 0.9.16 because of this. Thanks for telling me about this! Can you download the latest and try that... Thanks!


  6. Sarkazein reporter

    Glad to help. I just downloaded the new version and everything's working! I was successfully able to connect to my repo and clone it. Thanks for the quick support!

  7. Jason Harris repo owner

    Thanks again for reporting this and also for getting back to me. Sorry for such an abrupt introduction to MacHg. In all the 16 releases such a bad "zero day" bug has only happened twice... 0.9.10 and 0.9.15. MacHg really is a stable and good program :)

    Unfortunately its really a very hard problem to unit test UI's...

    Cheers, Jas

  8. iwbtate
    • changed status to open

    I'm having this same problem with version 0.9.23. Password doesn't stick with the configuration so the clone always fails. I'm on 10.7.

  9. Semblance Systems

    I too am having this problem as of today...v0.9.23 OS X Lion. It's only happening with one repository in particular...

  10. Former user Account Deleted

    My repository was working. Then after I clicked the "configure repository" to check the settings, it will not save my password and I can no longer access the repository.

    OSX 10.7 MacHg 0.9.23

  11. Jason Harris repo owner

    Thanks for the updates. I am investigating now. Can you guys file this under a new bug?

    Thanks, Jas

  12. Jason Harris repo owner

    Hi there, I tried this and it's working for me. Thus I need to dig a bit deeper as to why it's not working for you guys...

    First, one obvious question here, but this is https traffic right? Next, Can someone figure out instructions for reproducing this with a repo and password I can see. If you want you can email only me and I will keep your repo in the strictest of confidence. My email is jason@jasonfharris.com

    Or a public repo would be even better...

    Thanks, Jas

  13. Jesse Horne

    Hi Jason, any progress on this? I am encountering the same issue. Im on OSX 10.7.1 and MacHG 0.9.24 -- I can provide you with a repo and pass if you still need it.


  14. Jason Harris repo owner

    Hi Jesse,

    It would be great if you could provide me with a repo and a pass for this so I can reproduce this! My email is jason@jasonfharris.com

    (I hadn't gone any further with this since I couldn't reproduce it... But with your example, maybe :) )

    Thanks, Jas

  15. Jason Harris repo owner

    Does someone have a reproducible example for this? I can't make any progress on this until I can reproduce it... :)

    Cheers, Jas

  16. mikev_buzzhoney

    Hi Jason,

    I sent you an invite to a test bitbucket repo. Here's what I can do currently to recreate what I think is the problem (or a related problem):

    - Use the "Clone a Repository" button - Enter the test repo's server info and put in the password. The server is automatically checked, and it clones no problem. - I make a change to the repo (edit one of the test files in there) and commit the change - I try to push the change up, only to get a 255 abort authorization fail error

    At this point, if I go to the test repo entry that MacHg created and use "Configure test repo" (test repo being the name I gave it), it seems to work fine testing the server. But if I hit "Configure Server", from then on when I use the Configure test repo selection item, the password is blank. Entering it again, the test succeeds, but if I return -- no password.

    I can no longer push or pull form this repo, even though I was initially able to clone just fine, and clearly the password works if I enter it. I wonder if when I push/pull the password isn't really being sent, because it's not really saved properly?

    Note that this is a fresh MacHg install, with only one other repo -- cloned the same way, and with the same problem.

    I hope this is helpful...

  17. mikev_buzzhoney

    Since I'm still using MacHg, I needed a way to push, so I tried the following:

    - Right click in the repo list on the left hand side

    - Select "Add Server Repository..."

    - Enter one of the repos that isn't working; same URL, username, pass. Server test works.

    - Attempt to push by checking "allow push to any repository" and select the server repo just added.

    - This fails with an "http authentication required message". No password is present in the http url shown in the message window.

    - Quit MacHg, open it again

    - Check the server config. Password is there, server check works. This time instead of clicking "Configure Server" I click cancel.

    - Repeat push attempt using "allow push to any repository". Works fine!

    I ran into something like this previously, where the "Configure Server" button seemed to screw something up and required a Quit/Rerun for my password to stick, but didn't encounter it again until now.

    Also, it may be important to note that I'm running OS X Lion. I'll see if I can scrounge up a Snow Leopard mac to try my steps on.

    I sent you a bitbucket msg with my email if you still need it, and you should have admin access to that test repo. Hope this help!

  18. Jason Harris repo owner

    - Fix issue #204. (Fixes saving of passwords in server configurations due to bug in keychain handling in Lion .) - It turns out that [... removeFromKeychain] which calls SecKeychainItemDelete is causing keychain problems under Lion. This might be fixed in later update but it is the cause of #204 and I think #263 by the sound of it. - See: http://trac.adium.im/ticket/15381 http://forums.cocoaforge.com/viewtopic.php?f=13&t=23233 http://netbeans.org/bugzilla/show_bug.cgi?id=200319 http://hg.netbeans.org/main/rev/4b6e898afe30 http://www.tech-recipes.com/rx/17189/repair-keychain-to-fix-slow-os-x-lion/ https://discussions.apple.com/thread/3192474?start=0&tstart=0


  19. Log in to comment