Giter VIP home page Giter VIP logo

Comments (17)

crawshaw avatar crawshaw commented on May 19, 2024

The command works inside a go module. Not sure if we can make it compatible with a GOPATH.

from tailscale.

djc avatar djc commented on May 19, 2024

So I should cd into the repository clone? And that clone has to be in src/tailscale.com?

from tailscale.

sylr avatar sylr commented on May 19, 2024

GO111MODULE=on go install tailscale.com/cmd/tailscale{,d} to make it work outside of GOPATH.

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

The command works inside a go module. Not sure if we can make it compatible with a GOPATH.

I think it should still work in GOPATH mode but I hadn't tried.

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

I verified it works in GOPATH mode, after all the usual GOPATH-era pain of manually updating deps to required versions. (And of course it needs to be checked out at the right place in disk if using GOPATH mode)

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

@djc, what version of Go?

I documented this a bit more in fef2548

from tailscale.

djc avatar djc commented on May 19, 2024

I have go 1.12.15 on this machine. Since GOPATH is apparently not a well-supported option, what are the other steps I have to take to build it in a better supported mode? I reviewed the README updates but this doesn't seem to be explained yet. (Also you have a typo, "vesions".)

from tailscale.

kroppt avatar kroppt commented on May 19, 2024

@djc

Since GOPATH is apparently not a well-supported option, what are the other steps I have to take to build it in a better supported mode?

The following comment from above works, and it can be run from anywhere:

GO111MODULE=on go install tailscale.com/cmd/tailscale{,d} to make it work outside of GOPATH.

Go modules ensures you have the correct dependency versions. That command downloads all Go dependencies needed to build, builds the dependencies and the package in question, then installs (copies) the binary to your Go path's bin folder. Adding $(go env GOPATH)/bin to your PATH would be wise if you want quick access to programs built with Go.

You can also download the repository, change to the directory, and run go install tailscale.com/cmd/tailscale{,d} to do the same thing.

from tailscale.

djc avatar djc commented on May 19, 2024

That does something, but it appears Go 1.12 is not supported:

# tailscale.com/tempfork/osexec
go/pkg/mod/[email protected]/tempfork/osexec/exec.go:508:10: xe.Unwrap undefined (type *os.SyscallError has no field or method Unwrap)
note: module requires Go 1.13

I'll try again in a while after my distro upgrades to 1.13.

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

@djc, no need to wait for your distro. You can use another Go compiler trivially:

$ go get golang.org/dl/go1.13.8
$ go1.13.8 download

Then:

$ GO111MODULE=on go1.13.8 install tailscale.com/cmd/tailscale{,d} 

from tailscale.

djc avatar djc commented on May 19, 2024

So I have Go 1.13 now and I compiled tailscale and tailscaled. I then tried figuring out how to start. Here's some further feedback on next steps in the onboarding process; these maybe don't belong in this repository, but I do hope they're useful.

If I sign up with an email address on a personal account ([email protected]), after clicking the button "Sign up with email", the input field disappears and the button label changes to "Sign up another identity". I found this UX non-intuitive at least. Signing up with my GMail account does work. I found instructions here: https://tailscale.com/kb/1053/install-static (maybe also link this from the README). When I run enrai bin $ sudo ./tailscaled --state=tailscaled.state from my ~/go/bin dir as instructed, it fails with:

logtail started
Program starting: vdate.20200315: []string{"./tailscaled", "--state=tailscaled.state"}
LogID: ac6668053cd00a5f53464fab9b8a046e8b84e108fa36c04c1119a99517ba99d2
12.1M/26.1M Starting userspace wireguard engine.
12.2M/26.1M external packet routing via --tun=tailscale0 enabled
20.2M/34.3M CreateTUN: no such file or directory
wgengine.New: no such file or directory

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

I found this UX non-intuitive at least. Signing up with my GMail account does work.

Agreed. That whole UI is being redone at the moment.

20.2M/34.3M CreateTUN: no such file or directory

Do you have a /dev/net/tun device?

$ ls -l /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Feb 13 08:55 /dev/net/tun

Clearly we need a better error message at least. Will do that now.

from tailscale.

djc avatar djc commented on May 19, 2024

I don't have /dev/net. Presumably this might be some kernel option that I have not enabled?

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

I've pushed a better error message.

from tailscale.

bradfitz avatar bradfitz commented on May 19, 2024

You'll need CONFIG_TUN=y or =m in your kernel: https://cateee.net/lkddb/web-lkddb/TUN.html

from tailscale.

djc avatar djc commented on May 19, 2024

Alright, I've gotten it to work. Thanks!

A minor question I was left with after reading the documentation, in https://tailscale.com/kb/1033/ip-and-dns-addresses it would be nice if there was a bit more clarity about how consistency of IP addresses is achieved within a single authentication. Is that just a randomly generated ID that's stored in the tailscaled.state, or is there something going on that will work with e.g. MAC addresses or other machine characteristics?

from tailscale.

djc avatar djc commented on May 19, 2024

(It might still be useful to explain the GO111MODULE=on go1.13.8 install tailscale.com/cmd/tailscale{,d} in the README, too, and potentially document the requirement for the kernel config option somewhere.)

from tailscale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.