Comments (13)
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.
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.
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.
Not without debugging ghub.
from ghub.
@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.
Instrument ghub-request
and just step through. Elisp has a decent debugger.
from ghub.
from ghub.
from ghub.
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.
going to close this! I think @diasjorge blog did the trick!
from ghub.
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.
@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.
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?
from ghub.
Related Issues (20)
- Prompted for 2FA code, yet get error "Must specify two-factor authentication OTP code" HOT 10
- cannot obtain token while 2FA is enabled in Github HOT 1
- Problems using manual token HOT 1
- [FEATURE REQUEST] kanban boards into emacs? HOT 1
- Importance of username case for API authinfo retrieval HOT 5
- The token wizard will break in November HOT 11
- Search for ghub credentials is for the wrong user HOT 1
- cannot use `ghub-continue` to retrieve multiple pages HOT 1
- Documentation typo in section "2.2.4 Setting your Username for Other Hosts and/or Forges"
- error in process filter: BUG: missing headers HOT 4
- Always asking for username and token when using authinfo.gpg with 2-way authentication HOT 33
- 28.0.50: (wrong-type-argument stringp nil) when trying to set github.user HOT 1
- Dead link to Gitlab Tokens in documentation HOT 1
- Unable to use regenerated GitHub token HOT 3
- Unable to download issues from Gitlab HOT 2
- No longer builds with `package-build` from master HOT 2
- Does treepy go up to 0.1.2? HOT 2
- ghub--token: Required Github token does not exist HOT 2
- Error in ghub-get HOT 5
- "BUG: Missing Headers" Error Not Triggering Callbacks in Asynchronous Requests HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghub.