desktop / desktop

Focus on what matters instead of fighting with Git.
https://desktop.github.com
MIT License
19.72k stars 9.42k forks source link

adding repo from copied git link doesnt work [v3.4.3] #19150

Closed schroef closed 1 month ago

schroef commented 1 month ago

The problem

Im trying to add a repo using the copied git link from a repo wiki page. I simply copy the url and im trying to add it using Github Desktop App. Also trying to use the URL function returns an error Screenshot 2024-08-22 131114 Screenshot 2024-08-22 131029

Release version

3.4.3

Operating system

Win 11 rs26120.1542

Steps to reproduce the behavior

  1. Got "Current Repository" dropdown
  2. Click "Add" > Close Repository
  3. Paste in copied git url from repository online
  4. Error will show Screenshot 2024-08-22 131029

Log files

2024-08-22T16:56:04.317Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2} 2024-08-22T16:56:08.822Z - info: [ui] [AppStore] loading 10 repositories from store 2024-08-22T16:56:08.822Z - info: [ui] [AppStore] found account: schroef (schroef) 2024-08-22T16:56:09.049Z - info: [ui] launching: 3.4.3 (Windows 10.0.26120) 2024-08-22T16:56:09.051Z - info: [ui] execPath: 'C:\Users\romboutversluijs\AppData\Local\GitHubDesktop\app-3.4.3\GitHubDesktop.exe' 2024-08-22T16:56:10.017Z - info: [ui] Subscribed 'schroef' to Alive channel 2024-08-22T16:56:11.634Z - info: [ui] Stats reported. 2024-08-22T16:56:27.520Z - info: [ui] Executing fetch: git fetch --progress --prune --recurse-submodules=on-demand origin (took 1.282s) 2024-08-22T16:58:40.538Z - info: [ui] Executing getCommits: git log 12f3a5a8520bfb842c5f93b82fe33da42498197d --date=raw --max-count=1 -z --format=%H%x00%h%x00%s%x00%b%x00%an <%ae> %ad%x00%cn <%ce> %cd%x00%P%x00%(trailers:unfold,only)%x00%D --no-show-signature --no-color -- (took 1.235s) 2024-08-22T16:58:42.609Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T16:58:42.727Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T16:58:43.914Z - info: [ui] Executing fetch: git fetch --progress --prune --recurse-submodules=on-demand origin (took 1.180s) 2024-08-22T17:00:22.557Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:00:22.679Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:00:23.779Z - info: [ui] Executing fetch: git fetch --progress --prune --recurse-submodules=on-demand origin (took 1.093s) 2024-08-22T17:00:24.421Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 9 repositories took 12.0s of which 95.4s paused, total 107.4s 2024-08-22T17:02:18.896Z - info: [ui] Executing clone: git -c init.defaultBranch=main clone --recursive --progress -- https://github.com/schroef/Illustrator-Scripts/wiki D:_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki (took 1.622s) 2024-08-22T17:02:18.899Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- https://github.com/schroef/Illustrator-Scripts/wiki D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki exited with an unexpected code: 128. stderr: Cloning into 'D:_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki'... fatal: unable to update url base from redirection: asked for: https://github.com/schroef/Illustrator-Scripts/wiki/info/refs?service=git-upload-pack redirect: https://github.com/schroef/Illustrator-Scripts/wiki/

2024-08-22T17:02:30.322Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- https://github.com/schroef/Illustrator-Scripts/wiki D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki exited with an unexpected code: 128. stderr: Cloning into 'D:_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki'... fatal: unable to update url base from redirection: asked for: https://github.com/schroef/Illustrator-Scripts/wiki/info/refs?service=git-upload-pack redirect: https://github.com/schroef/Illustrator-Scripts/wiki/

2024-08-22T17:02:43.801Z - info: [ui] Executing clone: git -c init.defaultBranch=main clone --recursive --progress -- https://github.com/schroef/Illustrator-Scripts/wiki D:_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki (took 1.001s) 2024-08-22T17:02:43.806Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- https://github.com/schroef/Illustrator-Scripts/wiki D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki exited with an unexpected code: 128. stderr: Cloning into 'D:_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\wiki'... fatal: unable to update url base from redirection: asked for: https://github.com/schroef/Illustrator-Scripts/wiki/info/refs?service=git-upload-pack redirect: https://github.com/schroef/Illustrator-Scripts/wiki/

2024-08-22T17:04:20.282Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2} 2024-08-22T17:04:23.561Z - info: [ui] [AppStore] loading 10 repositories from store 2024-08-22T17:04:23.561Z - info: [ui] [AppStore] found account: schroef (schroef) 2024-08-22T17:04:23.587Z - info: [ui] [BranchPruner] Last prune took place 8 minutes ago - skipping 2024-08-22T17:04:23.948Z - info: [ui] launching: 3.4.3 (Windows 10.0.26120) 2024-08-22T17:04:23.949Z - info: [ui] execPath: 'C:\Users\romboutversluijs\AppData\Local\GitHubDesktop\app-3.4.3\GitHubDesktop.exe' 2024-08-22T17:04:24.174Z - info: [ui] Subscribed 'schroef' to Alive channel 2024-08-22T17:04:47.678Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T17:04:47.802Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T17:04:48.427Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:04:48.561Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:04:48.562Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 9 repositories took 2.6s of which 0.0s paused, total 2.6s 2024-08-22T17:05:38.208Z - warn: [ui] fetchRepository: 'schroef/Illustrator-Scripts.wiki.git' returned a 404 2024-08-22T17:05:38.312Z - warn: [ui] fetchRepository: 'schroef/Illustrator-Scripts.wiki.git' returned a 404 2024-08-22T17:05:38.432Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- schroef/Illustrator-Scripts.wiki.git D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\Illustrator-Scripts.wiki.git exited with an unexpected code: 128. stderr: fatal: repository 'schroef/Illustrator-Scripts.wiki.git' does not exist

2024-08-22T17:05:46.472Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- schroef/Illustrator-Scripts.wiki.git D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki\Illustrator-Scripts.wiki.git exited with an unexpected code: 128. stderr: fatal: repository 'schroef/Illustrator-Scripts.wiki.git' does not exist

2024-08-22T17:06:11.796Z - warn: [ui] Failed trying to find Git on PATH Error: Command failed: C:\WINDOWS\System32\where.exe git INFO: Could not find files for the given pattern(s).

at __node_internal_genericNodeError (node:internal/errors:932:15)
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:518:28)
at maybeClose (node:internal/child_process:1105:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)

2024-08-22T17:06:28.500Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2} 2024-08-22T17:06:31.739Z - info: [ui] [AppStore] loading 10 repositories from store 2024-08-22T17:06:31.740Z - info: [ui] [AppStore] found account: schroef (schroef) 2024-08-22T17:06:31.759Z - info: [ui] [BranchPruner] Last prune took place 10 minutes ago - skipping 2024-08-22T17:06:32.011Z - info: [ui] launching: 3.4.3 (Windows 10.0.26120) 2024-08-22T17:06:32.030Z - info: [ui] execPath: 'C:\Users\romboutversluijs\AppData\Local\GitHubDesktop\app-3.4.3\GitHubDesktop.exe' 2024-08-22T17:06:32.291Z - info: [ui] Subscribed 'schroef' to Alive channel 2024-08-22T17:08:57.873Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T17:08:57.997Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T17:08:58.664Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:08:58.782Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:08:58.783Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 9 repositories took 2.6s of which 0.0s paused, total 2.6s 2024-08-22T17:09:41.933Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2} 2024-08-22T17:09:45.363Z - info: [main] Received possible protocol arguments: 2 2024-08-22T17:09:45.378Z - error: [main] Malformed launch arguments received: C:\Users\romboutversluijs\AppData\Local\GitHubDesktop\app-3.4.3\GitHubDesktop.exe,--squirrel-firstrun 2024-08-22T17:09:45.378Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2} 2024-08-22T17:09:46.146Z - info: [ui] [AppStore] loading 10 repositories from store 2024-08-22T17:09:46.147Z - info: [ui] [AppStore] found account: schroef (schroef) 2024-08-22T17:09:46.167Z - info: [ui] [BranchPruner] Last prune took place 14 minutes ago - skipping 2024-08-22T17:09:46.458Z - info: [ui] launching: 3.4.3 (Windows 10.0.26120) 2024-08-22T17:09:46.459Z - info: [ui] execPath: 'C:\Users\romboutversluijs\AppData\Local\GitHubDesktop\app-3.4.3\GitHubDesktop.exe' 2024-08-22T17:09:47.115Z - info: [ui] Subscribed 'schroef' to Alive channel 2024-08-22T17:11:02.364Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T17:11:02.490Z - warn: [ui] fetchRepository: 'schroef/Save-Render-Presets.wiki' returned a 404 2024-08-22T17:11:03.227Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:11:03.364Z - warn: [ui] fetchRepository: 'schroef/uvlayout_bridge.wiki' returned a 404 2024-08-22T17:11:03.365Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 9 repositories took 3.1s of which 0.0s paused, total 3.1s 2024-08-22T17:11:07.295Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- github.com/schroef/Illustrator-Scripts//wiki D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki exited with an unexpected code: 128. stderr: fatal: repository 'github.com/schroef/Illustrator-Scripts//wiki' does not exist

2024-08-22T17:11:16.018Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- github.com/schroef/Illustrator-Scripts//wiki D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki exited with an unexpected code: 128. stderr: fatal: repository 'github.com/schroef/Illustrator-Scripts//wiki' does not exist

2024-08-22T17:11:16.910Z - error: [ui] git -c init.defaultBranch=main clone --recursive --progress -- github.com/schroef/Illustrator-Scripts//wiki D:\_DESIGN STUFF\Apps\Illustrator\Scripts\Bryan Buchanan\Wiki exited with an unexpected code: 128. stderr: fatal: repository 'github.com/schroef/Illustrator-Scripts//wiki' does not exist

Screenshots

No response

Additional context

No response

tidy-dev commented 1 month ago

@schroef Thank you for reaching out!

I have opened a PR to open up cloning of wiki's again. But, the root cause still exists in that the GitHub restful api doesn't support wiki's, thus GitHub Desktop doesn't fully support wiki's. The PR bypasses the restful api check for GitHub hosted repositories, thus, other checks against the api will still fail and some features that are available for regular GitHub repositories will not be available for wiki's.

In the meantime, the workaround is to clone it via the command line and then add it to GitHub Desktop.

Command line: git clone https://github.com/{user}/{repo}.wiki.git

Add to GitHub Desktop: a) Use the File > Add local repository.. b) or, drag and drop the repository folder onto GitHub Desktop

schroef commented 1 month ago

@tidy-dev thanks! I used SourceTree to make the repo and than i could use Github Desktop app, kinda weird but it works

Thanks for showing the code as well