mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-22 18:37:29 -05:00
Failed to create repository on windows network drive #1933
Closed
opened 2025-11-02 04:18:09 -06:00 by GiteaMirror
·
5 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v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1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#1933
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @BowmanChen on GitHub (Jun 14, 2018).
[x]):Description
I found Gitea have problems to create repository on windows network drive. thus, I tried to using mklink command to creating symbolic links on networked drive that still no useful. Does anyone know how to configure gitea to access windows network drive?
My issue very close this problems : [os: IsDir doesn't work with Windows OneDrive #22579] https://github.com/golang/go/issues/22579
My specific ROOT in app.ini as below. [repository] ROOT = W:/gitrepos1 <--- W: is network drive mapped.
D:>mklink /D “d:\gitrepos1” “W:\gitrepos1”
symbolic link created for d:\gitrepos1 <<===>> W:\gitrepos1
D:>net use
New connections will be remembered.
Status Local Remote Network
W: \xyz\gitprod1 xyz Network
The command completed successfully.
#gitea.log
2018/06/13 08:36:53 [I] Log Mode: File(Info)
2018/06/13 08:36:53 [I] XORM Log Mode: File(Info)
2018/06/13 08:36:53 [I] Cache Service Enabled
2018/06/13 08:36:53 [I] Session Service Enabled
2018/06/13 08:36:53 [I] Git Version: 2.16.2
2018/06/13 08:36:54 [I] SQLite3 Supported
2018/06/13 08:36:54 [I] Run Mode: Production
2018/06/13 08:36:55 [I] Listen: http://0.0.0.0:80
2018/06/13 08:36:55 [I] LFS server enabled
2018/06/13 08:38:08 […routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: chdir D:\gitrepos1\itadmin\test1.git: The system cannot find the path specified.
2018/06/13 08:38:59 […routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: chdir D:\gitrepos1\itadmin\test1.git: The system cannot find the path specified.
Screenshots
@BowmanChen commented on GitHub (Jun 14, 2018):
gitea cannot support UNC path. I tried reference this url hope to solve my problems, but still failed.
[os: make MkdirAll support path in extended-length form ] https://github.com/golang/go/commit/7a1347a1a1f6e99627a8e9bf098351c13162e5d6
In app.ini , I set to different UNC path , both not works on gitea.
case1:
[repository]
//?/W:/gitrepos1
case2:
[repository]
ROOT = //?/W:/
2018/06/15 00:09:06 [I] Log Mode: File(Info)
2018/06/15 00:09:06 [I] XORM Log Mode: File(Info)
2018/06/15 00:09:06 [I] Cache Service Enabled
2018/06/15 00:09:06 [I] Session Service Enabled
2018/06/15 00:09:06 [I] Git Version: 2.16.2
2018/06/15 00:09:06 [I] SQLite3 Supported
2018/06/15 00:09:06 [I] Run Mode: Production
2018/06/15 00:09:07 [I] Listen: http://0.0.0.0:80
2018/06/15 00:09:07 [I] LFS server enabled
2018/06/15 00:09:47 [...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: chdir \?\W:\gitrepos1\itadmin\test1.git: The system cannot find the path specified.
2018/06/15 00:14:33 [I] Log Mode: File(Info)
2018/06/15 00:14:33 [I] XORM Log Mode: File(Info)
2018/06/15 00:14:33 [I] Cache Service Enabled
2018/06/15 00:14:33 [I] Session Service Enabled
2018/06/15 00:14:33 [I] Git Version: 2.16.2
2018/06/15 00:14:34 [I] SQLite3 Supported
2018/06/15 00:14:34 [I] Run Mode: Production
2018/06/15 00:14:34 [I] Listen: http://0.0.0.0:80
2018/06/15 00:14:34 [I] LFS server enabled
2018/06/15 00:15:23 [...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository: chdir \?\W:\itadmin\test1.git: The system cannot find the path specified.
I compare tested windows command prompt that work.
D:>dir \?\W:
Volume in drive \?\W: is gitprod1
Volume Serial Number is 0001-172A
Directory of \?\W:
06/11/2018 09:04 PM
gitrepos10 File(s) 0 bytes
1 Dir(s) 4,398,046,511,104 bytes free
@BowmanChen commented on GitHub (Jun 14, 2018):
add more reference ,
[os: MkdirAll fails when creating top-level UNC paths on Windows #10900] https://github.com/golang/go/issues/10900
[os: IsDir doesn't work with Windows OneDrive #22579] https://github.com/golang/go/issues/22579
@lafriks commented on GitHub (Jun 19, 2018):
So this looks like golang issue so waiting for version 1.11
@BowmanChen commented on GitHub (Jun 20, 2018):
Hi @lafriks
It indeed related to golang issue. As my build a golang developer branches(newer than golang official 1.10.3) by myself. and tested my go sample code as below.
I'm able to created folder on windows network drive. and then I'm tried to download gitea source code and rebuild it with my build golang developer version. After running new build gitea on my windows server that still failed and got same error message: The system cannot find the path specified.
I'm so sad , I'm still under debugging why gitea still report failed to created repository [repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: InitRepository:]
https://github.com/go-gitea/git/blob/master/repo.go Line No. 61
...
// InitRepository initializes a new Git repository.
func InitRepository(repoPath string, bare bool) error {
os.MkdirAll(repoPath, os.ModePerm)
...
@BowmanChen commented on GitHub (Jun 20, 2018):
Hi @lafriks
I must analogize. Now, I knew why cannot create repository on windows network drive due to I register Gitea as a Windows service which Gitea CANNOT create repository on windows network drive, but CAN create repository on local disk without problems.
I stop Gitea Windows service and open a command prompt (cmd) as an Administrator, then run the following command: gitea.exe web, then Gitea able to create repository on windows network drive successfully.
gitea.exe use official version 1.4.2
I close this issue.
Many thanks.