gogs / gogs

Gogs is a painless self-hosted Git service
https://gogs.io
MIT License
45.11k stars 4.86k forks source link

Unable to update commits through SSH when use mounted devices #2550

Open getson opened 8 years ago

getson commented 8 years ago

Hi, I tried to use a network attached storage path for my repositories but doesn't work. Can you do it possible? The result is the same as with a normal folder in network storage, I use Windows server 2012. This will be a great thing for this project,because in most cases the data and application are stored in different servers.

Thank you for this awsome project :-)

unknwon commented 8 years ago

Thanks your feedback!

But,

I tried to use a network attached storage path for my repositories but doesn't work.

Basically I still don't know what is going on...?

getson commented 8 years ago

The path seems to be incorrect, I tried in this form the \mynasserver\repositories

unknwon commented 8 years ago

What is the error Gogs complains about?

getson commented 8 years ago

i put this in the repository root path as in this screenshot http://screencast.com/t/91owtrnqt and the error message is "Repository root path is invalid: mkdir //imb-nas: The specified path is invalid.", http://screencast.com/t/RKirOlbPc

unknwon commented 8 years ago

Thanks, this is indeed a problem...

getson commented 8 years ago

in asp.net web app http://www.codeproject.com/Articles/19830/How-to-Access-Network-Files-using-asp-net , if I find any solution I will let you know

dan-hughes commented 8 years ago

Does making the network share a mapped drive resolve?

getson commented 8 years ago

I tried this, but the same result

unknwon commented 8 years ago

@kpande I hope I know the answer... but I never heard that.. :sweat:

usagirei commented 8 years ago

As linked above, issue #1864 may be related When using a mount point to a local usb disk, the WebUI won't update over SSH (you can still push and clone over ssh, but updates only happen over HTTP/S)

Were you using a cifs mount? And does the repository work (but no updates, try fetching after pushing something on the nfs)

EDIT: I use this mount command for the nfs, however the issue i ran i only tested on a usb vfat mount mount -t cifs -o username=$USER%$PASS,sec=ntlm,uid=33,gid=33,file_mode=0664,dir_mode=0775 $REMOTEDIR $MOUNTDIR

EDIT2: Scratch that, just saw you're under Windows Server, regardless, similar issues happen under unix and mount paths ("Mapped drives")

unknwon commented 8 years ago

@getson can you read through this thread: https://github.com/gogits/gogs/issues/2662

see if possible to solve the issue.

jonlundy commented 8 years ago

I am having the same issue.. from what i can tell when i push to a new repository the bare repo is created on the network storage and i can then clone the repository fine. BUT the "is_bare" flag in the repository table in the database is not being changed to 0.

So, even though the git content is there the web is not seeing it..

If i manually change the is_bare flag to 0 then i can view the contents.

Also, it seems to not be adding pushes to the history log when they are being made.

EDIT: So it looks like there is an update hook in each repo that is not executing because the share is mounted with files as 660.. by changing the mask to 770 to allow execution it seems to be working.

unknwon commented 8 years ago

@JonLundy good tip, thanks.

IssueHuntBot commented 5 years ago

@0maxxam0 has funded $5.00 to this issue. See it on IssueHunt