Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can pull, can't push, although terminal push works #1073

Open
fevangelou opened this issue May 31, 2024 · 10 comments
Open

Can pull, can't push, although terminal push works #1073

fevangelou opened this issue May 31, 2024 · 10 comments
Labels
oauth-app-restrictions Tracking problems related to OAuth

Comments

@fevangelou
Copy link

The problem

On Ubuntu 23.10, in a brand new setup for GitHub Desktop (not the first time using on Ubuntu though), I authenticated to my GH account via browser and I could clone and fetch projects just fine. As an aside, I have also configured SSH integration via GH CLI. WHich works just fine, meaning I can authenticate via SSH (as well).

Unfortunately, I can't push code through the app. I get the dreaded can't authenticate error, although I'm already logged in.

I tried logging out and back in, nothing. I checked permissions, not an issue.

I can also clone a repo just fine, but I can't push any changed code to it.

If do "git push --all" through the terminal though, code is pushed just fine to the repo.

To be honest, I hadn't used the app for some time. I occasionally used it without an issue, but that could be more than a year ago. A few months ago (hence the 23.10 version) I went full on Ubuntu Desktop (after ditching MacOS use for 15+ years). Yesterday I setup the app to push some code to GH and got the dreaded "can't authenticate" error.

I don't have any customizations on my global .gitconfig file, beyond what GH CLI configured.

[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true
[user]
	name = My Name Here
	email = MY_USERNAME@users.noreply.github.com
[credential "https://github.com"]
	helper = 
	helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
	helper = 
	helper = !/usr/bin/gh auth git-credential

The repos I tried pushing code are not private and yes I have the correct permissions to push code (I'm the repo owner either way). Tried reboots, verified file permissions... nothing...

I'm truly baffled.

If there's a way I can debug this (beyond logging), please let me know.

In any case, I really appreciate your work and I thank you in advance for the effort you put in.

Release version

3.3.12-linux2 (x64)

Operating system

Ubuntu Desktop 23.10

Steps to reproduce the behavior

No response

Log files

// I cleaned up the logs and did a commit and then push - this is what was logged. Personal/repo details redacted.

2024-05-31T15:47:26.430Z - info: [ui] [AppStore] loading 73 repositories from store
2024-05-31T15:47:26.433Z - info: [ui] [AppStore] found account: USERNAME (My Name)
2024-05-31T15:47:26.473Z - info: [ui] [BranchPruner] Last prune took place 6 hours ago - skipping
2024-05-31T15:47:27.054Z - info: [ui] Subscribed 'USERNAME' to Alive channel
2024-05-31T15:47:27.198Z - info: [ui] launching: 3.3.12-linux2 (Linux 6.5.0-35-generic)
2024-05-31T15:47:27.199Z - info: [ui] execPath: '/usr/lib/github-desktop/github-desktop'
2024-05-31T15:47:58.406Z - info: [ui] [Timing] Action 'create commit' for 'orgX/repoY' took 0.140s
2024-05-31T15:48:00.863Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: repoY - USERNAME (has token)

Screenshots

image

Additional context

No response

@theofficialgman
Copy link

update to the latest release https://github.com/shiftkey/desktop/releases and then try signing out and back in (in account settings in the app) and report back if your issue is fixed or not

@fevangelou
Copy link
Author

Unfortunately it still doesn't work. Even tested on 2 different PCs with Ubuntu 23.10 (the 2nd one was a new installation).

The log writes just this line when showing the popup:

2024-06-03T17:03:31.743Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: REPO_NAME_HERE - REPO_OWNER_HERE (has token)

@shiftkey
Copy link
Owner

shiftkey commented Jun 4, 2024

/I need more details from the application to be able to troubleshoot further. Please check the logs created at ~/.config/GitHub\ Desktop/logs/ from around the time of the issue to see if it actually includes the failing push/pull.

You might need to close the app to flush the log files to disk.

@fevangelou
Copy link
Author

I've already provided the logs. The first copy of the logs is the entire log from a "launch the app > commit code > push code" process. The second log (with the latest release of the app) was also the same, I just copied the last line if it makes any sense.

@fevangelou
Copy link
Author

fevangelou commented Jun 4, 2024

For brevity, here's a fresh copy of the log:

2024-06-04T22:16:57.944Z - info: [ui] [AppStore] loading 73 repositories from store
2024-06-04T22:16:57.947Z - info: [ui] [AppStore] found account: REPO_OWNER_HERE (REPO NAME HERE)
2024-06-04T22:16:57.990Z - info: [ui] [BranchPruner] Last prune took place 9 hours ago - skipping
2024-06-04T22:16:58.290Z - info: [ui] launching: 3.3.18-linux1 (Linux 6.5.0-35-generic)
2024-06-04T22:16:58.293Z - info: [ui] execPath: '/usr/lib/github-desktop/github-desktop'
2024-06-04T22:16:58.499Z - info: [ui] Subscribed 'REPO_OWNER_HERE' to Alive channel
2024-06-04T22:17:46.279Z - info: [ui] [Timing] Action 'create commit' for 'SOME_ORG/SOME_REPO' took 0.117s
2024-06-04T22:17:49.019Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: SOME_REPO - REPO_OWNER_HERE (has token)

For the time being I'm just using the app to commit code but I push code through the terminal only.

@panthosarkar
Copy link

I am having the same issue . I am using Kali Linux . I installed the latest version recently , I am trying this for 2 days , i have tried installing and uninstalling it over and over , also i cleared my git log , tried installing git and uninstalling it again . i can pull , push , fetch from vs code git and ssh but not from the desktop software . well i can pull and push my own rep , but when i try to pull rep from my office it gives me "this rep not exist or name changed " type error . even though i can pull the same rep from my vs code git and ssh . i am new to this kali linux environment .

@LivingWithHippos
Copy link

The latest release fixed this for me, I have to say I had issues with the kde wallet around the time it broke, because it started asking me for its password to use the wifi and other stuff after an update, I think they may have botched something (It got updated again and now it works)

After the update signing in didn´t work (something like #768) so I had to fix the mime type

Checking out the github sign-in link it's x-github-desktop-dev-auth://oauth?code=xxxx

So I checked the arch wiki and it pointed to the mimeapps.list file

In the file it's desktop-auth and not desktop-dev-auth

$  grep "github" ~/.config/mimeapps.list
x-scheme-handler/x-github-client=github-desktop.desktop;GitHub Desktop.desktop;
x-scheme-handler/x-github-desktop-auth=github-desktop.desktop;GitHub Desktop.desktop;
x-scheme-handler/x-github-client=github-desktop.desktop
x-scheme-handler/x-github-desktop-auth=github-desktop.desktop

duplicated the auth line and changed it

x-scheme-handler/x-github-desktop-dev-auth=github-desktop.desktop
x-scheme-handler/x-github-desktop-auth=github-desktop.desktop

Logged back into linux and the everything worked again

endeavourOs with KDE 6 and wayland, app installed from aur

@panthosarkar
Copy link

Can you help me doing this , I tried but still its not working . I guess I made some mistake while editing the mime app list , there was no github on my mimelist

@LivingWithHippos
Copy link

Can you help me doing this , I tried but still its not working . I guess I made some mistake while editing the mime app list , there was no github on my mimelist

This is to fix the browser not opening back github desktop after authorizing it, not for the pull/push issue, anyway:

  1. what's your linux distro and desktop environment
  2. how did you install github desktop

You could try adding the ones I posted, but do you have a github-desktop option in your start menu? Right click on the icon in the start menu to check its details

@panthosarkar
Copy link

i am using kali linux 2024.2 , I installed github desktop by terminal, from shiftkey repo , i just uninstalled it , trying to install it for the last time
and i hope it will work

@shiftkey shiftkey added the oauth-app-restrictions Tracking problems related to OAuth label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oauth-app-restrictions Tracking problems related to OAuth
Projects
None yet
Development

No branches or pull requests

5 participants