Force Github Integration to re-authorise with Github


#1

I downloaded the beta in order to take advantage of the Git and Github integrations. They worked brilliantly initially, however I found that I have lost functionality on the Github tab (I see only a blank tab).

I couldn’t see anywhere in the package settings to try reauthorising with Github so I revoked access from Github in the hopes it would prompt Atom to ask for permissions again (maybe this was a mistake).

I then tried removing my repo’s project folder from Atom, and then re-adding it and now I’ve lost the Git tab too - it simply asks me to create a repository.

Any help would be appreciated since apparently I’m only making things worse!


#2

From my poking around, I think the GitHub tab will only work if you have a git repository open as a project, otherwise it will be blank. Then if the git repo doesn’t have a remote pointing to a GitHub repo, the GitHub tab will say that.

Can you confirm if you have a git repo open as a project, do you still see a blank tab?

Hmm, that should mean that the project folder you added isn’t a git repository. Can you confirm if that’s the case?


#3

Yes.

So my Git tab came back and is working beautifully. Staging commits, viewing diffs and committing is a breeze. But I still have nothing on the GitHub (preview) tab.

Remotes are also set correctly. :confused:


#4

Hmmm, are there any errors in devtools? And which operating system are you running? If you’re using macOS, the token you used to login through the GitHub tab is saved in Keychain Access so you can delete that item (the entry is called atom-github when I tried things out) and maybe that will bring the GitHub tab back since you have to login again?


#5

So this error is coming up in devtools:
<embedded>:178912 Uncaught (in promise) TypeError: Cannot read property '1' of null at /Applications/Atom Beta.app/Contents/Resources/app/node_modules/github/lib/git-shell-out-strategy.js:943:1 at Array.map (native) at /Applications/Atom Beta.app/Contents/Resources/app/node_modules/github/lib/git-shell-out-strategy.js:940:1 at next (<anonymous>) at step (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/github/lib/git-shell-out-strategy.js:103:1) at /Applications/Atom Beta.app/Contents/Resources/app/node_modules/github/lib/git-shell-out-strategy.js:110:1

And I have nothing in my Keychain Access called atom-github so that’s probably a bit of a problem. Running MacOS Sierra (10.12.4).


#6

Thanks for that, I wonder if you might just be hitting a bug. Can you share your remote settings?

git remote -v

#7

Thanks, output below:

genomicsengland	https://github.com/genomicsengland/REPO.git (push)
origin	git@github.com:zantetsuken88/REPO.git (fetch)
origin	git@github.com:zantetsuken88/REPO.git (push)
upstream	git@github.com:genomicsengland/REPO.git (fetch)
upstream	Nope, you're not pushing to remote (push)```

#8

Ohhhh do you have a pushurl set for upstream? If so, it looks like there’s already an issue for that:

I can reproduce the blank GitHub tab and the same “Uncaught (in promise) TypeError: Cannot read property ‘1’ of null” error message if I add a push URL to some remote e.g.:

git remote set-url --push origin git@github.com:USER/REPO.git

#9

I’m having a similar issue with GitHub authorisation in Atom Beta (18).

I have been using the GitHub desktop app together with Atom for several months successfully. I branch, I sync (push and pull), I commit, I do pull requests. I’ve also been using the MergeConflicts package without problems.

I was really looking forward to switching to Atom Beta to do all my GitHub tasks. I can stage and commit without problem. But every time I push or pull, I have to enter my username and password. And there is nothing in the GitHub (preview) pane. Even when I switch branches to a branch which has a current pull request, it is not picked up by the GitHub tab. I have to manually enter the GitHub URL.

How can I get Atom Beta to a) pick up and b) retain my GitHub username and password? I would be very grateful for your help with this.


#10

Update - I closed the GitHub desktop app and Atom and Atom Beta. Then I opened just Atom Beta and reopened my project. But now I can’t push or pull. The GitHub login box appears, I sign in, the login box disappears, a spinner appears in the tray and then after a few moments, the login box appears again with both fields blank. Despite repeated attempts, I can’t sign in to GitHub from Atom Beta.

Any help would be greatly appreciated.


#11

getting this error in devtools;

Could not connect to indexedDB EventdbOpenRequest.onerror @ :15318
:15318 Could not connect to indexedDB EventdbOpenRequest.onerror @ :15318


#12

Do you have the same issue in safe mode @adrian3H?

  • Exit all instances of Atom
  • Start Atom with atom --safe

If you still get that same error in devtools in safe mode, can you exit out of Atom, make sure to save any unsaved work, and then try starting Atom and clearing saved state?

atom --clear-window-state

#13

Thank you for your response.

I tried both suggestions without luck.

I have been able to push changes, but I have to sign in every time I click ‘push’ and usually have to sign in 3 times before the push actually takes place.

A friend told me that Atom asked him to set up a token for git access, the first time he sued the new GitHub package. That never happened for me. Is that significant?


#14

I wonder if this is relevant - https://help.github.com/articles/providing-your-2fa-authentication-code/#when-youll-be-asked-for-a-personal-access-token-as-a-password


#15

And see this - https://github.com/atom/github/issues/411

When using the github package and fetching from an https server, you need to provide a personal access token, not a password.

Perhaps this issue wasn’t been resolved before GitHub was integrated into Atom.


#16

Ahhh, I see you found this issue about the GitHub package with 2FA enabled:

Looks like Ash has asked for more info in the issue, that’s probably the best place to dig further for now.


#17

I guess I am also facing the same problem. I don’t see anything on the GitHub tab, nor am I able to commit using the Git tab, though the Git tab shows blank panels for staged and unstaged changes even if there are changes. I’ve attached a copy of the error logs. Could someone please tell me how to fix this? Thank you for your help.

Uncaught (in promise) Error: spawn UNKNOWN
    at exports._errnoException (util.js:1022:11)
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at exports.spawn (child_process.js:399:9)
    at Object.exports.execFile (child_process.js:160:15)
    at Object.module.(anonymous function) [as execFile] (ELECTRON_ASAR.js:200:20)
    at F:\atom-beta-windows\Atom Beta\resources\app.asar\node_modules\dugite\build\lib\git-process.js:65:52
    at Function.exec (F:\atom-beta-windows\Atom Beta\resources\app.asar\node_modules\dugite\build\lib\git-process.js:48:16)
    at Proxy.executeGitCommand (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:419:54)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:266:50
    at Generator.next (<anonymous>)
    at step (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:197)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:443
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:105
    at Promise (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:363:32)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:264:22
    at Generator.next (<anonymous>)
    at step (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:197)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:443
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:105
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:26:44
    at Generator.next (<anonymous>)
    at step (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:7:197)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:7:443
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:7:105
    at Task.execute (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:31:13)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:96:26
    at Generator.next (<anonymous>)
    at step (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:7:197)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:7:443
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:7:105
    at AsyncQueue.processTask (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:102:13)
    at AsyncQueue.processQueue (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:76:18)
    at AsyncQueue.push (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\async-queue.js:63:16)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:181:39
    at Generator.next (<anonymous>)
    at step (F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:197)
    at F:\atom-beta-windows\Atom Beta\resources\app\node_modules\github\lib\git-shell-out-strategy.js:92:367