I have a a Golang Git project.
I tried to use go get -insecure my.domia.com/alerts
but i got the fellowing error.
OK: 214 MiB in 23 packages
Fetching https://my.domia.com/alerts?go-get=1
https fetch failed: Get https://my.domia.com/alerts?go-get=1: http: server gave HTTP response to HTTPS client
Fetching http://my.domia.com/alerts?go-get=1
Parsing meta tags from http://my.domia.com/alerts?go-get=1 (status code 404)
package my.domia.com/alerts: unrecognized import path "my.domia.com/alerts" (parse http://my.domia.com/alerts?go-get=1: no go-import meta tags)
Could any one help please? I really appreciate it.
Or, if anyone could help to install manually.
Thanks,
Related
I have a go program which imports a custom module hosted internally
import (
"fmt"
"log"
...
"gitlab.org.myteam.com/teamrepo/project1"
)
When I do go build I get following errors:
main.go:15:2: no required module provides package gitlab.org.myteam.com/teamrepo/project1; to add it:
go get gitlab.org.myteam.com/teamrepo/project1
As directed when I do go get I get following errors:
go: downloading gitlab.org.myteam.com/teamrepo/project1 v1.0.1
go: gitlab.org.myteam.com/teamrepo/project1#v1.0.1: verifying module: gitlab.org.myteam.com/teamrepo/project1#v1.0.1: reading https://sum.golang.org/lookup/gitlab.org.myteam.com/teamrepo/project1#v1.0.1: 404 Not Found
server response: not found: gitlab.org.myteam.com/teamrepo/project1#v1.0.1: unrecognized import path "gitlab.org.myteam.com/teamrepo/project1": https fetch: Get "https://gitlab.org.myteam.com/teamrepo/project1?go-get=1": dial tcp 10.xx.xx.xxx:443: connect: connection refused
I am not sure what I am doing wrong here. git clone on this repository works fine, so it is accessible.
Further, two things that I find confusing in the errors are:
Why go is trying to read the path reading https://sum.golang.org/lookup/gitlab.org.myteam.com/teamrepo/project1#v1.0.1: 404 Not Found
And, how it decided to fetch version v1.0.1 as I haven’t explicitly specified this version anywhere.
go version go1.19.4 darwin/amd64
I'm having problem while vendoring my go-project. Tried with both glide and go-dep - getting same problem.
$ go get -u go.opencensus.io gives the following error:
package go.opencensus.io/opencensus-go: unrecognized import path "go.opencensus.io/opencensus-go" (https fetch: Get https://go.opencensus.io/opencensus-go?go-get=1: dial tcp <some-ip>: i/o timeout)
Github link of this package - https://github.com/census-instrumentation/opencensus-go
Tried setting a proxy to shell
export http_proxy=http://104.248.231.49:8080/
export https_proxy=http://104.248.231.49:8080/
And then it worked.
Unrecognized import path while fetching go package gin. How do I resolve this issue
go get github.com/gin-gonic/gin
package gopkg.in/go-playground/validator.v8: unrecognized import path "gopkg.in/go-playground/validator.v8" (https fetch: Get https://gopkg.in/go-playground/validator.v8?go-get=1: dial tcp: i/o timeout)
package gopkg.in/yaml.v2: unrecognized import path "gopkg.in/yaml.v2" (https fetch: Get https://gopkg.in/yaml.v2?go-get=1: dial tcp: i/o timeout)
According to issue #51 - which has a similar error - indicates that this is a problem with your network. Try again later or use some proxy, as suggested on the GitHub page, such as:
Goproxy
Lantern
Also, make sure you can go get other packages. It might be a package only problem or a 'global' one. In this case try the proxies above
I just tried the command, and it works find.
Is your GOPATH correctly set? see the documentation for more info.
I try to use go get gopkg.in/fatih/pool.v2 to install pool according to Readme.md, but can't success:
C:\Users\xiaona\Documents\GitHub> go get -v gopkg.in/fatih/pool.v2
Fetching https://gopkg.in/fatih/pool.v2?go-get=1
https fetch failed.
Fetching http://gopkg.in/fatih/pool.v2?go-get=1
import "gopkg.in/fatih/pool.v2": http/https fetch: Get http://gopkg.in/fatih/poo
l.v2?go-get=1: dial tcp 107.178.216.236:80: ConnectEx tcp: A connection attempt
failed because the connected party did not properly respond after a period of ti
me, or established connection failed because connected host has failed to respon
d.
package gopkg.in/fatih/pool.v2: unrecognized import path "gopkg.in/fatih/pool.v2
"
While access 107.178.216.236:80 is OK in web browser.
I try to use go get github.com/fatih/pool, and it also works OK.
Could anyone give some clues on this issue?
BTW: I use windows powershell and git version is 1.9.5.
The root cause has been found: Because my computer use a web proxy, so I need to set proxy in environment variable:
C:\Users\xiaona>set https_proxy=https://web-proxy.corp.hp.com:8080/
C:\Users\xiaona>set http_proxy=https://web-proxy.corp.hp.com:8080/
C:\Users\xiaona>go get -v gopkg.in/fatih/pool.v2
Fetching https://gopkg.in/fatih/pool.v2?go-get=1
Parsing meta tags from https://gopkg.in/fatih/pool.v2?go-get=1 (status code 200)
get "gopkg.in/fatih/pool.v2": found meta tag main.metaImport{Prefix:"gopkg.in/fa
tih/pool.v2", VCS:"git", RepoRoot:"https://gopkg.in/fatih/pool.v2"} at https://g
opkg.in/fatih/pool.v2?go-get=1
gopkg.in/fatih/pool.v2 (download)
gopkg.in/fatih/pool.v2
Then, all is OK!
I set up a new virtualenv. From within it, pip cannot find any distributions. Outside of the env, it can. Here's the output:
(wagon-admin)[me#pjs-macbook-pro wagon-admin]$ pip install Django
Downloading/unpacking Django
Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:480: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django
Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:480: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/ when looking for download links for Django
Cannot fetch index base URL https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:480: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django
Could not find any downloads that satisfy the requirement Django
No distributions at all found for Django
Storing complete log in /Users/me/.pip/pip.log
I'm on OSX, and created the virtual environment using virtualenvwrapper. $ mkvirtualenv <env name>
This happens for all packages, not just django.
Edit: Only similar thing I've found in my searching: https://github.com/pypa/pip/issues/829
I had the same problem but realized I hadn't activated my virtualenv. Once I activated it, the installation worked. Not sure why.
Looking at the command line you pasted, it looks like you activated your env, but just wanted to note this for others who happen to stumble across this.
I updated to python 2.7 and everything works fine now.