-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git init failed with Permission denied #53
Comments
I tried both |
|
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 ***@***.***> wrote:
1. If you run git from cygwin, try to start cygwin with elevated
permissions as admin. Or try native windows build of git.
2. 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
<#53 (comment)>,
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. |
Hi @pavelxkrejci do you have any suggesition for a workaround? |
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 . |
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!! |
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 libfuse/sshfs#243 being closed. Now the workaround is to do the initial clone at host and then doing |
I build the newest version and can solve it |
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
The text was updated successfully, but these errors were encountered: