github
github copied to clipboard
Error When Trying To Access Private Github Repo
Description
In the GitHub (preview) tab displays "An unknown error occurred"
After checking the developer tools Network tab. The below is the response from https://api.github.com/graphql
{"query":"query Pr {relay {...F4}} fragment F0 on User {url,id} fragment F1 on Bot {url,id} fragment F2 on Node {id,__typename} fragment F3 on PullRequest {url,number,title,state,createdAt,author {login,avatarUrl,__typename,...F0,...F1,...F2},repository {name,owner {login,id,__typename},id},reactionGroups {content,users {totalCount}},commits {totalCount},_labels3D9oIE:labels(first:100) {edges {node {name,color,id},cursor},pageInfo {hasNextPage,hasPreviousPage}},id} fragment F4 on Query {_repositoryeNnn7:repository(owner:\"ORGNAME\",name:\"REPO\") {_pullRequestsk0zh:pullRequests(first:30,headRefName:\"master\") {totalCount,edges {node {id,number,title,url,...F3},cursor},pageInfo {hasNextPage,hasPreviousPage}},id}}","variables":{}}
I have replace the owner and repo names as its private
Steps to Reproduce
- Open a private repo in atom
- Open tab on the right using ctrl + shift + 8 to see the GitHub tab
Expected behavior:
I expected to see pull requests if there are any or something like the below screenshot
Actual behavior:
An unknown error occurred is displayed in the GitHub tab
Reproduces how often:
This happens every time I open the GitHub tab for this repo
Versions
atom --version output
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0
apm --version
apm 1.18.1
npm 3.10.10
node 6.9.5 x64
python 2.7.13
git 2.13.3.windows.1
visual studio 2015
Additional Information
I can push and pull from/to the repo in atom
I get the same problem. I think the login I provided for the repo may have been wrong. but there doesn't seem to be a place to unset the GitHub login credentials
Server request for query `Pr` failed for the following reasons:
1. Could not resolve to a Repository with the name 'sigma-monorepo'.
agment F4 on Query {_repository1SJdNm:repository(owner:"omer
I fixed it by going to github.com > settings > Authorized OAuth Apps > GitHub for Atom > grant permissions
I have this problem too, with a private repo owned by an organization. They're a little paranoid, not inclined to change anything related to security.
This means I can't use the github package at all, for any repo. 😞
I do hope this can be fixed.
Not true! If I restart Atom then I seem to be able to use the github package on authorized repos.
That's a relief.
It works for me with public repos, but I need to request permission from a private repo owner for it to work even though I have access to that repo every other way. I tried restarting Atom, but had the same problem. Thanks to the earlier post by @HarveyThayer, I realized I had to click a button to request Atom access to a private repo.
Thank you folks, I didn't realise what was the problem with my Atom installation until I found this issue! "An unknown error occurred." does not suffice and would be nice to have a message/link about granting permissions on your Github settings.
I tried authorizing the github package for a different private organization. Even though GitHub shows a note saying that an email requesting authorization was sent, they never received an email.
And, there doesn't appear to be any ability to cancel or re-send the email. If that first one disappears, you're locked in that state forever. :)
As others said here, telling the owners of the org to manually go into the oauth settings and enable the permission did work.
Are you still having trouble @SC7639? If so and you were having trouble with a private organization repository, you may need to authorize the Atom for GitHub app 1 2 as other folks have mentioned in the thread.
FWIW, I've never been able to use the "GitHub" panel, as much as I'd love to see what it can do.
At the moment, I'm getting the message Query errors reported. Could not resolve to a Repository with the name 'insert-name-here'
.

Looking forward to eventually seeing what this tab can do one day...
@trusktr I had a similar error using forge in Emacs. Anyway, it works for me if I set github.user
and github.email
in my git config. https://github.com/magit/forge/issues/192#issuecomment-528386826 gave me the idea.
I fixed it by going to github.com > settings > Authorized OAuth Apps > GitHub for Atom > grant permissions
Thanks, And because this is still relevant:
github.com -> Your Profile icon -> Settings -> Applications -> Authorized OAuth Apps -> Atom GitHub package (the name not the three dots) -> grant permissions
FWIW, I've never been able to use the "GitHub" panel, as much as I'd love to see what it can do.
At the moment, I'm getting the message
Query errors reported. Could not resolve to a Repository with the name 'insert-name-here'
.![]()
Looking forward to eventually seeing what this tab can do one day...
I had the exact same issue - I was able to fix it for me by
- adding an SSH key that was generated on my machine to my GitHub account
- (re-)cloning the project I was working on using the SSH URL
- enter the token you can generate from the 'GitHub for Atom' panel
I fixed it by going to github.com > settings > Authorized OAuth Apps > GitHub for Atom > grant permissions
Thanks Harvey!! This works for me - needed to grant permission to that repo under the Organisation Access section. Refreshed the connection in Atom and it now works :)