I followed the tutorial for glide usage. I did glide init
and a glide.yaml
was created successfully. Post that, when I did glide update
, I am getting below error. Any idea how do I resolve this?
I installed glide
using go get github.com/Masterminds/glide
Note: I am doing these operation on Windows
via Git Bash
terminal.
(Not sure, but if GOPATH
value is required, it is /c/Users/aagoyal/eclipse-workspace-oxygen/GoPath/:/d/Edge_OSS/code/microservice/NE3SProto/
. And my code is in location /d/DAAAS/Edge_OSS/code/microservice/NE3SProto/src/ne3s
)
$ glide update
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching updates for github.com/gorilla/mux
[INFO] Resolving imports
[INFO] --> Fetching updates for github.com/gorilla/context
[INFO] Downloading dependencies. Please wait...
[INFO] Setting references for remaining imports
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/gorilla/context
[INFO] --> Exporting github.com/gorilla/mux
[INFO] Replacing existing vendor dependencies
[ERROR] Unable to export dependencies to vendor directory: Error moving files: exit status 1. output: Access is denied.
0 dir(s) moved.
In my case, I was getting the same error when running Glide on Windows in an automated build environment. It seemed to be a problem moving the files from whatever temp directory Glide was using into the final vendor directory.
For me, I was able to get around the issue by overriding the GLIDE_TMP
environment variable such that it was located in my project's build directory. So, in your case, you can try either setting the GLIDE_TMP
variable to a working directory near your project directory, or using the glide --tmp value
argument to do so just once as part of each Glide command
e.g. (assuming Bash terminal):
GLIDE_TMP=/d/DAAAS/Edge_OSS/code
glide update
or
glide --tmp /d/DAAAS/Edge_OSS/code update
If that temp directory doesn't work, you could instead try using your /d/DAAAS/Edge_OSS/code/microservice/NE3SProto/src/ne3s
project directory as the temp directory, in which case Glide will temporarily create a random glide-vendor1234567
subdirectory there until it moves the files to vendor
.