Coder Social home page Coder Social logo

Mercurial keyring support about git HOT 5 CLOSED

felipec avatar felipec commented on July 22, 2024
Mercurial keyring support

from git.

Comments (5)

felipec avatar felipec commented on July 22, 2024

It is supported, I just tried and it works out-of-the-box.

You can also try with something like this in your .hgrc:

[auth]
bb.prefix = https://bitbucket.org/foo/
bb.username = foo
bb.password = foo_passwd

from git.

kbrownlees avatar kbrownlees commented on July 22, 2024

Are we both talking about https://pypi.python.org/pypi/mercurial_keyring (support for KWallet, Gnome Keyring, OSX and Windows keyrings)? Doesn't look like your code is doing a extensions.loadall(myui) so no extra extensions get loaded by default?

Adding

try:
    extensions.load(myui, 'mercurial_keyring', None)
except ImportError:
    pass

Gets me to the point of mercurial.error.Abort: mercurial_keyring: http authorization required but program used in non-interactive mode
Which is the point where it works if I go and checkout that repo somewhere else using raw hg. Works perfectly first time if we turn interactive mode back on - not sure if this may cause other problems though.

from git.

felipec avatar felipec commented on July 22, 2024

All extensions get eventually loaded. You first push once with mercurial, and then then the rest of the time you can push in git. I tested it, it works fine.

If there's a good reason we could turn on interactivity, or use git's keyring support. But I think for now the support is good enough.

from git.

kbrownlees avatar kbrownlees commented on July 22, 2024

I will accept once you have a repository it works, I was testing by trying to create a fresh repository. It seems like it doesn't get enabled before we get the point where the clone gets performed? Can you provide an example of creating a fresh repository from a https source with authentication?

ie:

kbrownle@kbrownle-u-kubuntu:~/test $ git clone hg::https://example.com/testengine
Cloning into 'testengine'...
ERROR: Repository error: http authorization required
kbrownle@kbrownle-u-kubuntu:~/test $ git init testengine
Initialised empty Git repository in /home/kbrownle/test/testengine/.git/
kbrownle@kbrownle-u-kubuntu:~/test $ cd testengine/
kbrownle@kbrownle-u-kubuntu:~/test/testengine $ () git remote add origin hg::https://example.com/testengine
kbrownle@kbrownle-u-kubuntu:~/test/testengine $ () git pull
ERROR: Repository error: http authorization required
kbrownle@kbrownle-u-kubuntu:~/test/testengine $ ()

from git.

felipec avatar felipec commented on July 22, 2024

I tried to write up the steps and I found exactly what you mean. So I pushed this fix 9a40fe2. Should work now.

from git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.