upvote
Gitlab uses 2h. TIL that GitHub uses 8h.
reply
2 hours is plenty. The recent binance hack was 20 minutes after all. A 2 hour token is enough time to get all that can be gotten or done by a token in almost any system especially well defined ones like GH or GL.

It would be nice if GitHub or GitLab could limit a token to a given IP, but with how proxies and dynamic ips work I would imagine it would be a hassle to get it working correctly for everyone, but it’s better than nothing.

reply
IP prefix should be enough to narrow down to your ISP + rough geographic location. Not perfect but requires no extra setup.
reply