glide icon indicating copy to clipboard operation
glide copied to clipboard

glide cannot detect vcs from local package

Open malphi opened this issue 7 years ago • 10 comments

Don't know why glide need to fetch a local package. As following, "forecasting_service/app" is a file (source code ) in my project, another file called it. Why glide fetch it and throw error?

[INFO] Downloading dependencies. Please wait... [INFO] --> Fetching updates for github.com/astaxie/beego. [INFO] --> Fetching updates for github.com/golang/protobuf. [INFO] --> Fetching updates for golang.org/x/net. [INFO] --> Fetching updates for google.golang.org/grpc. [INFO] --> Fetching updates for github.com/garyburd/redigo. [INFO] --> Fetching updates for github.com/Sirupsen/logrus. [INFO] --> Fetching updates for google.golang.org/genproto. [INFO] --> Fetching updates for github.com/grpc-ecosystem/grpc-gateway. [INFO] --> Fetching updates for github.com/spf13/viper. [INFO] Resolving imports [INFO] --> Fetching forecasting_service/app. [WARN] Unable to checkout forecasting_service/app [ERROR] Error looking for forecasting_service/app: Cannot detect VCS [WARN] Unable to set version on forecasting_service/app to . Err: Cannot detect VCS [WARN] Unable to set version on forecasting_service/app to . Err: Cannot detect VCS [INFO] --> Fetching forecasting_service/conf.

malphi avatar Jul 03 '17 02:07 malphi

glide version 0.12.3

malphi avatar Jul 03 '17 02:07 malphi

Why it fetch our local package ?

[INFO] --> Fetching updates for golang.org/x/image. [INFO] --> Fetching updates for github.com/gorilla/context. [INFO] --> Fetching updates for golang.org/x/net. [INFO] --> Fetching analytics. [WARN] Unable to checkout analytics [ERROR] Error looking for analytics: Cannot detect VCS [INFO] --> Fetching db. [WARN] Unable to checkout db

toandph avatar Jul 03 '17 22:07 toandph

I see this error too.

quanghuy1288 avatar Jul 04 '17 06:07 quanghuy1288

You can add ignore to glide.yaml

ignore:
- forecasting_service

oldfeel avatar Jul 09 '17 12:07 oldfeel

I am also encountering this problem. Adding ignore: - forecasting_service

does not affect the problem

Anomalyzero avatar Jul 25 '17 23:07 Anomalyzero

I have the same problem, anyone solves it?

tfzxyinhao avatar Aug 02 '17 10:08 tfzxyinhao

Workaround:

package: [YOUR PACKAGE]
ignore:
- [YOUR PACKAGE]/[SUBPACKAGE]
import:
...

frankcarey avatar Aug 03 '17 22:08 frankcarey

Did this problem solved? I see this error now. Error ...... cannot detect VCS Warning.... for import github/* work well. It does not work on import others

Arlenmbx avatar Mar 30 '18 07:03 Arlenmbx

Resolved the issue. After going though the Glide code understood the root cause. Its not the glide issue. Glide must have flag to ignore server certificates. Solution: Get Common CA certificates Ubuntu - https://launchpad.net/ubuntu/xenial/+package/ca-certificates Similarly search for other OS and install and try.

subbu05 avatar Jun 06 '18 18:06 subbu05

@subbu05

I install ca dpkg -i ca-certificates_20170717_16.04.1_all.deb dpkg -i ca-certificates_20160104ubuntu1_all.deb

still dailed

glide install [INFO] Loading mirrors from mirrors.yaml file [INFO] Lock file (glide.lock) does not exist. Performing update. [INFO] Loading mirrors from mirrors.yaml file [INFO] Downloading dependencies. Please wait... [INFO] --> Fetching golang.org/x/sys [INFO] --> Fetching google.golang.org/grpc [WARN] Unable to checkout google.golang.org/grpc [ERROR] Update failed for google.golang.org/grpc: Cannot detect VCS [WARN] Unable to checkout golang.org/x/sys [ERROR] Update failed for golang.org/x/sys: Cannot detect VCS [ERROR] Failed to do initial checkout of config: Cannot detect VCS Cannot detect VCS

lurenjia528 avatar Jul 14 '18 01:07 lurenjia528