Bug 434670 - Kdevelop fails to authenticate on Github
Summary: Kdevelop fails to authenticate on Github
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Project provider: Github (show other bugs)
Version: 5.6.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-20 14:09 UTC by David
Modified: 2024-10-29 13:03 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2021-03-20 14:09:27 UTC
SUMMARY
Kdevelop's GH plugin fails to log in to GH.

STEPS TO REPRODUCE
1. Fetch project
2. enter credentials for GH
3. 

OBSERVED RESULT
Credentials are not accepted and the procedure returns an error saying it was impossible to write a token for that account. Exact message:
"
Authentication failed. Please try again.
Could not create token: "KDevelop Github Provider : localhost.localdomain - sab mar 20 14:06:54 2021 GMT"
You can check the authorization for this application and others at https://github.com/settings/tokens.
"
EXPECTED RESULT
Credentials should be accepted.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:fc33 
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.79
Qt Version: 5.15.2

ADDITIONAL INFORMATION
notice that adding a manually created token (from GH website) in the kdeveloprc file, under [ghprovider] as:
name=[username]
token=[tokenID]
solves the issue and I can see my projects.
I either ways observe no crash in Kdevelop unlike others.
Comment 1 Paul Worrall 2021-07-12 19:22:02 UTC
I can reproduce this.
I'm using a token generated by GitHub at the URL linked in the KDevelop error message (see original report)

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3
Kernel Version: 5.8.0-59-generic (64-bit)
Graphics Platform: X11
Processors: 4 × AMD A6-3420M APU with Radeon(tm) HD Graphics
Memory: 5.3 GiB of RAM
Graphics Processor: AMD SUMO
Comment 2 Ikari 2022-04-15 15:39:42 UTC
Nearly a year later, but I also have this problem. 
I am not on a VPN.
I do not have MFA enabled.
Comment 3 yudahsshadow 2024-04-10 15:44:47 UTC
The suggested work around, of adding the token created on github.com works to get the initial download of the repo, but it doesn't allow for pushing (or I assume pulling) code back to the repo, as that also requires logging in now, and kdevelop doesn't seem to pass the username back to the process. I get the following error when pushing.

"/home/username/project_dir> git push
Command exited with value 128.
fatal: could not read Username for 'https://github.com': No such device or address

Command finished with error UnknownError."

I suspect being able to login at the start would fix this. What I think has happened is that github has changed their login procedure, and kdevelop is still using the old way of logging in and creating a token via the api. What has to happen now is you create the access token on github.com and use that token as your password when logging in to get repos and push/pull. There also needs to be a mechanism for updating the token as the new fine-grained access tokens must expire, and the furthest out I was able to push one was 1 year.