| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
If this was compiled on regular Windows, do paths like /c/.../ even work?
Chrome support needs to be tested before this can be merged.
Sorry, something went wrong.
You were correct in questioning this, |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
This needs the relative path stuff from eargollo's PR so ~/file on windows corresponds to ~/file on the server instead of C:\Users\dean\file. I understand you two wanted to combine your PRs into one.
The README's "OS support" section should be updated saying how to get it working on Windows.
Sorry, something went wrong.
|
@deansheather The issue i am seeing with his code, is that there is ATLEAST 100+ lines of code MISSING from his fork and the Mainstream Repo. Which means (to me atleast) i dont know if i can SAFELY add his code into mine and have it be update, which i have informed him of this and he is confused about it Also he has yet to get back to me on that EDIT: On local build, adding his code into mine manually does seem to work, but if i were to, for example sshcode --skipsync developer@archlinux /home, in the command status output, it gives this bash: line 0: cd: /home/developer/../../msys: No such file or directory which means its treating the root folder as its own file path arg, which i have no clue how to fix. |
Sorry, something went wrong.
|
That needs to be fixed then, should be as simple as stripping the msys paths. |
Sorry, something went wrong.
|
Yep, I just need to figure out how to do that... And rsync still isn't
working. At all.
…On Tue, Aug 6, 2019, 7:09 PM Dean Sheather ***@***.***> wrote:
That needs to be fixed then, should be as simple as stripping the msys
paths.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#127>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPQOXUPELOUL7NFSBZJDR3QDIVEHANCNFSM4IGL5L3Q>
.
|
Sorry, something went wrong.
|
You should probably use deltacopy instead of rsync on windows. |
Sorry, something went wrong.
|
@roberthmiller
Welp this is actually my first time even touching go code and judging from the progress, im actually doing pretty okay. I dont know how to do that yet so if you want, feel free to fork and help me out! |
Sorry, something went wrong.
There was a problem hiding this comment.
Tested this with Merith today on Windows 10 in a VM, using MINGW64 (from Git Bash):
2019-08-08 12:59:14 FATAL error: failed to sync settings: CreateFile //Users/dean/AppData/Roaming/Code/User: The network name cannot be found.
2019-08-08 12:52:25 INFO failed to stat ~/.ssh directory, disabling connection reuse feature: CreateFile ~\.ssh: The system cannot find the path specified.
bash: line 0: cd: too many arguments
Sorry, something went wrong.
|
My bad, forgot Windows doesn't have sockets. SSH master connections aren't really possible on Windows except in WSL. If the OS is Windows, we should skip the SSH directory check and not attempt to open a master socket. |
Sorry, something went wrong.
|
I am pretty sure that is what he was attempting to do with --skip-sync, but we would have to apply that by default on windows... Not sure if that is a good idea or not (seems fine for me). |
Sorry, something went wrong.
|
All skip sync does is make it not sync with `rsync`? Right? Or am I wrong?
Couldn't we use `scp`? I think it might have a sync directive. I may be wrong.
…On Wed, Aug 7, 2019, 8:33 PM Robert M ***@***.***> wrote:
I am pretty sure that is what he was attempting to do with --skip-sync,
but we would have to apply that by default on windows... Not sure if that
is a good idea or not (seems fine for me).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#127>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPQOXWXFSF52B7QJESTH5LQDOHX7ANCNFSM4IGL5L3Q>
.
|
Sorry, something went wrong.
|
@roberthmiller I wasn't referring to sync when I said master connections don't work on Windows. Sync is definitely possible on Windows, and should work with rsync once the code that determines which directory to use locally is fixed. |
Sorry, something went wrong.
|
Updated with master ssh connection fixed, AND the 2019-08-08 12:59:14 FATAL error: failed to sync settings: CreateFile //Users/user/AppData/Roaming/Code/User: The network name cannot be found. issue, the code that converted the windows filepath to a linux compatable format was adding a extra / where it wasnt needed in reference to @eargollo 's // gitbashWindowsDir translates a directory similar to `C:\Users\username\path` to `~/path` for compatibility with Git bash.
func gitbashWindowsDir(dir string) (res string) {
res = filepath.ToSlash(dir)
res = "/" + strings.Replace(res, ":", "", -1)
return res
}Specifically res = "/" + strings.Replace(res, ":", "", -1) |
Sorry, something went wrong.
There was a problem hiding this comment.
I looked, specifically to remove the annoying "requested changes" that left basically nothing
Sorry, something went wrong.
*Fixed Master SSH connection issue (Flat out Disabled if on windows) *~/ seem to go to WINDOWS ~ for some odd reason... *rsync is now the issue. error 11, testing possible fixes |
Sorry, something went wrong.
|
It looks like the ~ is a problem. Is the issue here? https://github.com/cdr/sshcode/pull/127/files#diff-7ddfb3e035b42cd70649cc33393fe32cR134 Why not exclusively use user. HomeDir ? |
Sorry, something went wrong.
Quite possibly. Im testing to see if that entire code block, "relativeWindowsPath" is actually needed. when i disabled it. it seems to simplfy the issue from /home/user/../../<path to mingw isntall directory on windows>/<path you told it to go to> not existing, My mingw install dir is C:\msys\ example sshcode developer@archlinux used to give the error (for me) now its EDIT for your comment @roberthmiller : I dont know yet, Im still learning this programming language, but i am working on ~/ paths, if you have a replacement for that, i would be happy to hear it (along with a gobyexample link so i can look at its reference if possible?) |
Sorry, something went wrong.
|
rsync still does not work due to how its requesting the server's directory 2019-08-09 13:40:22 INFO syncing settings sending incremental file list rsync: change_dir "/Users/zachd/AppData/Roaming/Code/User" failed: No such file or directory (2) rsync: mkdir "/home/developer/~/.local/share/code-server/User" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(664) [Receiver=3.1.3] 2019-08-09 13:40:23 FATAL error: failed to sync settings: failed to rsync '/Users/zachd/AppData/Roaming/Code/User/' to 'developer@archlinux:~/.local/share/code-ser ver/User/': exit status 11 |
Sorry, something went wrong.
|
I MADE IT WORK!!! So rsync was trying to use /Users inside a mingw enviroment, which flat out doesnt work, so i tried slapping a /c to the beginning AND IT WORKS zachd@DESKTOP-BQUQ80R MINGW64 /c/Users/zachd/Documents/Workspace2/sshcode-msys
$ ./sshcode.exe developer@archlinux workspace
2019-08-09 13:49:46 INFO OS is windows, disabling connection reuse feature
2019-08-09 13:49:46 INFO ensuring code-server is updated...
++ uname -m
+ '[' x86_64 '!=' x86_64 ']'
+ pkill -f /home/developer/.cache/sshcode/sshcode-server
+ true
+ mkdir -p /home/developer/.local/share/code-server /home/developer/.cache/sshcode
+ cd /home/developer/.cache/sshcode
+ curlflags='-o latest-linux'
+ '[' -f latest-linux ']'
+ curlflags='-o latest-linux -z latest-linux'
+ curl -o latest-linux -z latest-linux https://codesrv-ci.cdr.sh/latest-linux
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
+ '[' -f /home/developer/.cache/sshcode/sshcode-server ']'
+ rm /home/developer/.cache/sshcode/sshcode-server
+ ln latest-linux /home/developer/.cache/sshcode/sshcode-server
+ chmod +x /home/developer/.cache/sshcode/sshcode-server
2019-08-09 13:49:48 INFO syncing settings
sending incremental file list
sent 226 bytes received 14 bytes 480.00 bytes/sec
total size is 1,131,117 speedup is 4,712.99
2019-08-09 13:49:49 INFO synced settings in 414.7449ms
2019-08-09 13:49:49 INFO syncing extensions
sending incremental file list
./
13xforever.language-x86-64-assembly-2.2.11/
13xforever.language-x86-64-assembly-2.2.11/.vsixmanifest
13xforever.language-x86-64-assembly-2.2.11/CHANGELOG.md
13xforever.language-x86-64-assembly-2.2.11/LICENSE.txt
13xforever.language-x86-64-assembly-2.2.11/README.md
13xforever.language-x86-64-assembly-2.2.11/language-configuration.json
13xforever.language-x86-64-assembly-2.2.11/logo.png
13xforever.language-x86-64-assembly-2.2.11/package.json
13xforever.language-x86-64-assembly-2.2.11/.vscode/
13xforever.language-x86-64-assembly-2.2.11/.vscode/launch.json
I cut off there becayse it was going to take FOREVER with all my extensions |
Sorry, something went wrong.
|
When i ran travis personally on this, i get this go test -v ./...
=== RUN TestSSHCode
2019-08-09 21:07:59 INFO ensuring code-server is updated...
sh: 25: [[: not found
Warning: Permanently added '[127.0.0.1]:9360' (RSA) to the list of known hosts.
sh: 25: [[: not found
go version go1.12.7 linux/amd64
++uname -m
+'[' x86_64 '!=' x86_64 ']'
+pkill -f /home/travis/.cache/sshcode/sshcode-server
+true
+mkdir -p /home/travis/.local/share/code-server /home/travis/.cache/sshcode
+cd /home/travis/.cache/sshcode
+curlflags='-o latest-linux'
+'[' -f latest-linux ']'
+curl -o latest-linux https://codesrv-ci.cdr.sh/latest-linux
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 90.1M 100 90.1M 0 0 82.3M 0 0:00:01 0:00:01 --:--:-- 82.4M
+'[' -f /home/travis/.cache/sshcode/sshcode-server ']'
+ln latest-linux /home/travis/.cache/sshcode/sshcode-server
+chmod +x /home/travis/.cache/sshcode/sshcode-server
2019-08-09 21:08:01 INFO syncing settings
sh: 25: [[: not found
sending incremental file list
rsync: mkdir "/home/travis/gopath/src/go.coder.com/retry/.local/share/code-server/User" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(674) [Receiver=3.1.1]
|
Sorry, something went wrong.
|
But when i actually BUILD it. it has no issue? i built it and ran it myself. (Archlinux, windows10-mingw64) it didnt have any issues... |
Sorry, something went wrong.
There was a problem hiding this comment.
how do i make this "requested changes" GO AWAY!? IVE MADE THE CHANGES!
Sorry, something went wrong.
|
@roberthmiller I looked into your suggestion, that would work for git4windows as your home directory is C:\Users\user, but it wouldnt exactly play NICE with mingw enviroments, since mingw uses /home/user instead, Although i think i could implement the os/user import to help determine user, only issue with that is on windows it flat out gives your user in this format PACNAME\username |
Sorry, something went wrong.
|
If you just need the home directory path, use os.UserHomeDir(). |
Sorry, something went wrong.
|
That's fine for git4win (uses your c:\users\Username as home) , but it still reads Mingw as windows when Mingw uses /home/username GOOS on git4win and Mingw, are detected as WINDOWS, But I shall check further, I still and trying to figure out just WHY Travis is failing despite the program compiling and running without any issue on actual systems (hell, it still works on my android phone. Chrome doesn't work but every thing else does as expected) |
Sorry, something went wrong.
|
FROM THIS POINT ON, THE PUSHES ARE JUST GOING TO BE SHILLED TO TRY AND GET IT TROUGH THE BLOODY PIPELINE WHILE ALSO NOT BREAKING SUPPORT FOR SYSTEMS |
Sorry, something went wrong.
|
closing this to make a CLEANER PR |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
EDIT: OLD IMAGES HAVE BEEN REDUCED TO LINKS TO SAVE POST SPACE
Basically, I have made sshcode run properly on msys/mingw enviroments,
TL;DR
Summary of my edits
TODO
C:\Misc\MegaSync\Code\Workspace\sshcode>go build C:\Misc\MegaSync\Code\Workspace\sshcode>sshcode.exe --skipsync merith@192.168.0.101 2019-07-29 20:58:13 �[94mINFO�[0m failed to stat ~/.ssh directory, disabling connection reuse feature: CreateFile ~\.ssh: The system cannot find the path specified. 2019-07-29 20:58:13 �[94mINFO�[0m ensuring code-server is updated... 2019-07-29 20:58:13 �[31mFATAL�[0m error: failed to update code-server: ---ssh cmd--- ssh merith@192.168.0.101 '/usr/bin/env bash -l' ---download script--- set -euxo pipefail || exit 1 [ "$(uname -m)" != "x86_64" ] && echo "Unsupported server architecture $(uname -m). code-server only has releases for x86_64 systems." && exit 1 pkill -f ~/.cache/sshcode/sshcode-server || true mkdir -p ~/.local/share/code-server ~\.cache\sshcode cd ~\.cache\sshcode curlflags="-o latest-linux" if [ -f latest-linux ]; then curlflags="$curlflags -z latest-linux" fi curl $curlflags https://codesrv-ci.cdr.sh/latest-linux [ -f ~/.cache/sshcode/sshcode-server ] && rm ~/.cache/sshcode/sshcode-server ln latest-linux ~/.cache/sshcode/sshcode-server chmod +x ~/.cache/sshcode/sshcode-server: exec: "sh": executable file not found in %PATH%attached image is of it building and running (first working release,)
https://user-images.githubusercontent.com/10422110/61765201-ef1c0e80-ad90-11e9-87cb-b46e6dc2a909.gif
This image is of the second build working just fine, Note, yes i did have to drag the window over from the side, that is because i have two monitors, and for some reason my mouse wasnt recorded so... thats a thing
https://user-images.githubusercontent.com/10422110/62153007-8533c580-b2b8-11e9-9d2b-03e25af9bbd0.gif
8-9-2019, 1211 -7PST
This build has the sshMaster fix (i didnt bother building it again just for the example as it would take FOREVER as seen in previous pictures, and sorry for horrible quality,)
https://user-images.githubusercontent.com/10422110/62803352-094b3180-ba9f-11e9-818f-4c4b93fb60ed.gif
8-9-2019, 1308 -7PST
this build is a work in progress, some users may have to modify main.go to match their setups. otherwise sshcode --skipsync user@server /<choosen filepath> works. In the example i open /opt on the server
https://user-images.githubusercontent.com/10422110/62806173-f50b3280-baa6-11e9-8438-71a5aa6d7104.gif
8-9-2019, 1358 -7PST
Not going to upload gif, would take to long, but rsync now works provided its installed and in path
UPDATE: DESPITE WHAT TRAVIS SAYS, IT WORKS, AND BUILDS JUST FINE