Go/Goland can't find github repositories

I'm currently working in Go to make some microservices, using go get works perfectly fine to install the packages required however it does not find them in my IDE (Goland by Jetbrains) they show up in the editor like this

 

when using the macro in Goland to it provides the option to run the go get command, when running that command the terminal shows this error

I did some searching and couldn't find much on it, one thing I saw people saying was for the github import that it couldn't find my SSH key on Github, I've checked and re-added my SSH key to Github and it's working as intended. Should also mention that the repo in the import is private.

1
5 comments
Avatar
Permanently deleted user

Is it go.mod project or gopath project? for a gopath, is "Index entire gopath" check box on in "Preferences | Go | Gopath" ?

0

It's a gopath project, and yes i have index entire gopath ticked

0
Avatar
Permanently deleted user

ok, let's do that -

create please an issue in our bug tracker (Help | Submit a bug report)

and then add there logs (Help | Compress Logs and Show...)

And we weill try to reproduce the issue

0

Hi George! 

Find more about Go, what are its pros and cons, and what projects can benefit from using this programming language in application development: https://yalantis.com/blog/why-use-go/. Hope it would be useful.

 

-2

I know this original message is from about 4 years ago, but I had a similar issue with external references not being found, such as from github.com.  I am running GoLand 2023.2.2 on Windows 11, with the Windows Subsystem for Linux where GoLand accesses the Linux file system from within Windows 11.  I noticed that with go installed on the Linux subsystem, that the Project GOPATH has a path set to something like this:  \\wsl$\Ubuntu\home\rkanagy\go, which GoLand says does not exist and does not show up in the folder structure that shows up when one attempts to add a Project GOPATH.  However, the go folder is actually a symbolic link to the following folder:  \\wsl$\Ubuntu\home\rkanagy\.local\opt\go-bin-v1.21.1.  Once I set the Project GOPATH to the actual folder, and not the symbolic link, which is set by default when I create a project, or at least open the project from a folder, the issues with not finding my github.com imports are resolved.  It appears that GoLand does not find folders that are symbolic links when opening projects found in the file system on the Windows 11 Linux subsystem.  I wanted to mention this in case it may help someone else.

0

Please sign in to leave a comment.