hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.87k stars 579 forks source link

Fingerprint check failing for github #1998

Closed cadeo111 closed 10 months ago

cadeo111 commented 1 year ago

You can find session logs by date and version information in: ~/.config/org.sparkleshare.SparkleShare/logs/ on Linux and macOS C:\Users\YOUR_USERNAME\AppData\Roaming\org.sparkleshare.SparkleShare\logs\ on Windows

To help us help you, please include the logs from around the time the issue occurred, as well as the SparkleShare version and info about your OS (displayed at the top of the log files). Then, tell us roughly in these steps what went wrong:

What happened:

I tried to set up sparkleshare with github

What I expected to happen:

I expected sparkleshare to connect to github

This happens when:

I follow the steps on the wiki for setting up github

here are the logs for when it failed:

10:34:51 Environment | Git LFS 2.3.4
10:34:51 Environment | Git 2.15.1
10:34:51 Environment | macOS 12.6.3 (Unreleased Version)
10:34:51 Cmd | ssh | ssh-keygen -t rsa -b 4096 -P "" -C "<my computer> (SparkleShare)" -f "2023-05-05_10h34.key"
10:34:53 Auth | Created key pair: 2023-05-05_10h34.key
10:35:02 Config | Wrote to '<correct file path>/org.sparkleshare.SparkleShare/projects.xml'
10:35:02 Cmd | osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/SparkleShare.app", hidden:false}'
10:35:02 Controller | Added /Applications/SparkleShare.app to login items
10:35:17 Fetcher | <correct file path>/.config/org.sparkleshare.SparkleShare/tmp/FoodWatch@keese.dev | Fetching folder: ssh://git@github.com/FoodWatch@keese.dev.git
10:35:17 Auth | Fetching host key for github.com
10:35:17 Cmd | ssh-keyscan -t rsa -p 22 github.com
10:35:18 Auth | Fingerprint doesn't match
10:35:18 Fetcher | Failed

for some reason, the fingerprint I get from GitHub is:

b8:d8:95:ce:d9:2c:0a:c0:e1:71:cd:2e:f5:ef:01:ba:34:17:55:4a:4a:64:80:d3:31:cc:c2:be:3d:ed:0f:6b

which is different than the fingerprint saved in the GitHub preset:

9d:38:5b:83:a9:17:52:92:56:1a:5e:c4:d4:81:8e:0a:ca:51:a2:64:f1:74:20:11:2e:f8:8a:c3:a1:39:49:8f

I was able to fix this by building locally after replacing the fingerprint in this file

Has GitHub changed its fingerprint? or is this just a problem with however I have my ssh hosts set up? is there an easier way to fix this without having to rebuild?

Thanks for reporting your issue or feature request, it helps lots!

r4v5 commented 1 year ago

Has GitHub changed its fingerprint?

Yes, it changed in late March.

felsgaertner commented 1 year ago

Has GitHub changed its fingerprint?

Yes, it changed in late March.

Will this be reflected in an updated Flatpak?

notslow commented 1 year ago

Bitbucket.org also rotated their keys recently. I was able to update the fingerprint to the new one on my Mac using the script in this answer: https://superuser.com/questions/1088165/get-ssh-key-fingerprint-in-old-hex-format-on-new-version-of-openssh/1254573#1254573. One note on the Mac you need to use shasum -a 256 to get the fingerprint. I picked the fingerprint that matched the key in my known_hosts file. Once you get the fingerprint you can edit the file at this location:/Applications/SparkleShare.app/Contents/Resources/Presets/bitbucket.xml (replace bitbucket.xml with github.xml using the key above if that is needed) I did not need to rebuild the app, just restart it to pick up the new key.

hbons commented 10 months ago

Fixed by 6cfd602259da3edd83a7930ae3212b948d42041c