Git Product home page Git Product logo

Comments (13)

diasjorge avatar diasjorge commented on July 17, 2024

I wrote an explanation in my blog how to do it: https://mrdias.com/2018/04/01/using-magit-with-github-enterprise.html

Anyway I think if you're getting prompted for a token it might be you haven't configured the ghub.host for the repo you're visiting. https://magit.vc/manual/ghub/Setting-the-Username.html#Setting-the-Username

from ghub.

donahchoo avatar donahchoo commented on July 17, 2024

Thanks @diasjorge! Much closer now... I'm not sure where the problem was. However, when I try to list the issues I'm prompted for my username and password. Then I get this:

HTTP Error: 400, "Bad Request", "and Github didn't return JSON"

All the URLs look correct, but I don't understand why I'm getting prompted for my username and password if I have the ~/.authinfo setup...

machine github.foo.bar.com/api/v3 login donahchoo^ghub password TOKEN
machine github.foo.bar.com/api/v3 login donahchoo\^magithub password TOKEN

Also, I have my username set:

[github "github.foo.bar.com/api/v3"]
        user = donahchoo
[github]
        user = donahchoo

Thoughts?

from ghub.

vermiculus avatar vermiculus commented on July 17, 2024

If you're getting HTTP 400, I'd be curious to see the full request. Not sure how to go about that with url though.

from ghub.

vermiculus avatar vermiculus commented on July 17, 2024

Not without debugging ghub.

from ghub.

donahchoo avatar donahchoo commented on July 17, 2024

@vermiculus I can try to debug ghub. Just need to know how.

I'm also pretty sure this is SSO related which is why I opened the other issue...

from ghub.

vermiculus avatar vermiculus commented on July 17, 2024

Instrument ghub-request and just step through. Elisp has a decent debugger.

from ghub.

diasjorge avatar diasjorge commented on July 17, 2024

from ghub.

donahchoo avatar donahchoo commented on July 17, 2024

from ghub.

diasjorge avatar diasjorge commented on July 17, 2024

You could use M-x eval-expression and execute the following expression on the magit-status buffer. (ghub--host) and see if it's making the request to the right host.

from ghub.

donahchoo avatar donahchoo commented on July 17, 2024

going to close this! I think @diasjorge blog did the trick!

from ghub.

tarsius avatar tarsius commented on July 17, 2024

Ah! The things blog posts can do that the official manual can not... (The tip about includeIf is very useful, but everything else is covered by the manual.)

You are not saying what eventually fixed the problem, but for future reference, I think it is that you did eventually set ghub.host. Without that ghub tries to access api.github.com.

from ghub.

donahchoo avatar donahchoo commented on July 17, 2024

@tarsius the manual is a great reference and it awesome you have documentation. However it is not substitute for a step by step guide for how to do things. I read the manual several times and couldn't get things to work. The blog post also talks about having an entry for github.com and your GHE instance. I think that made the difference. I'm not finding that I set ghub.host, unless that comes from .authinfo.

from ghub.

tarsius avatar tarsius commented on July 17, 2024

I have improved the manual, the "Getting Started" node and the first two points in "Interactively...". Please have another look - does that address the things that previously were unclear?

7f23879

from ghub.

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.