Open dipucian opened 6 years ago
I tried both \\sshfs\user@host
and \\sshfs\windowsUser=user@host
I'm using native windows build, not running git from cygwin. And I have read write access to the folder with \sshfs, when I copy files into this folder on Windows, it appears to have the correct owner/group when I check on Linux side, so I think permissions for the Linux user is not a problem.
If I git init
elsewhere and copy the .git
folder into it, other git
commands seems to work.
Chris
On Tue, Aug 14, 2018, 15:34 pavelxkrejci notifications@github.com wrote:
- If you run git from cygwin, try to start cygwin with elevated permissions as admin. Or try native windows build of git.
- Try to check permissions set for the user account on the ssh server. Does it work with different ssh client?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/billziss-gh/sshfs-win/issues/53#issuecomment-412781713, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxxEgmDgSIgvkcgGxPWyPhLpSH1Ji0pks5uQn2PgaJpZM4V7ptT .
The problem may be that windows git tries to set hidden attribute on ".git" folder which is not available on Linux/ssh. The error message would be than more likely result of git internal logic and not directly related to sshfs. Edit: This is confirmed in Process Monitor all git filesystem operations result with success.
Hi @pavelxkrejci do you have any suggesition for a workaround? I have the same problem .
I just maybe found one, I have logged in to the linux box and created a git repository using git init inside the shared folder . then I opened the shared folder from windows and tried to commit/fetch changes, all worked well :)
Easiest might be just "git init" in a local folder and then move the ".git" folder to the intended ssh folder.
This also is an issue when rendering reports with https://github.com/rstudio/rmarkdown which also created hidden directory (similar to the .git directory) and fails to run on directories mounted with sshfs-win
Same problem with hg, but commits don't even work there.
Win10, right click on the [Git Bash] icon and select 'Run as Administrator'
Here is a simplest solution!! First show your hidden files of drives then open command-line By "Run as administrator"!!
I am using TortoiseHg and cannot do anything because of permission denied errors for the .hg directory.
Edit: Obviously referring to Mercurial and not Git.
I've been tracking down this issue and it's a mixture of problems across three applications:
As you can see in the linked issue on sshfs I've submitted a patch that will check whether a directory is accessible if mkdir fails with EPERM, returning the correct EEXIST code if it is. With this patch I've been able to successfully clone a Git repo using sshfs-win.
Seems like the "git clone" would start working if sshfs was updated to v3.7.2, thanks to @peterbelm and https://github.com/libfuse/sshfs/issues/243 being closed.
Now the workaround is to do the initial clone at host and then doing git config core.autocrlf false git config core.filemode false on windows in the mapped directory.
I build the newest version and can solve it https://github.com/ld199607/sshfs-win
I can map a network drive (
Z:
) and have read/write access to it, but when I trygit init
, it failed with error like:Z:/deployScript/.git/: Permission denied
where should I look? for these kind of problem.
Thanks