Home > Blockchain >  go get : There is no tracking information for the current branch
go get : There is no tracking information for the current branch

Time:03-11

When I type in the command go get -u github.com/ndelphit/apkurlgrep

I get the error

There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> master

package github.com/ndelphit/apkurlgrep: exit status 1

CodePudding user response:

After a little bit of digging, I found a similar issue here. One suggestion was to delete src from the go directory and this worked for me.

So here is what I did (Linux):

  1. Find the go folder (for me it is located in the home directory) and cd into it

    cd go

  2. List the contents of the go folder

    ls

  3. You should see the src folder, now delete it:

    rm -rf src

  4. Try the go get command again (for your package)

    go get -u github.com/ndelphit/apkurlgrep

  5. You shouldn't get the error, run the package that you have installed (in my case apkurlgrep) to see if it has been installed. It runs!

CodePudding user response:

It depends on your local Go version and if you are doing the command from a go project (with its go.mod), or outside any project.

Inside a project, try a go clean -modcache, and your

go get github.com/ndelphit/apkurlgrep
  • Related