diff --git a/plugin/remote/gitlab/gitlab.go b/plugin/remote/gitlab/gitlab.go index 984eed6b9..69b50b34f 100644 --- a/plugin/remote/gitlab/gitlab.go +++ b/plugin/remote/gitlab/gitlab.go @@ -268,7 +268,7 @@ func (r *Gitlab) OpenRegistration() bool { func (r *Gitlab) GetToken(user *model.User) (*model.Token, error) { expiry := time.Unix(user.TokenExpiry, 0) - if expiry.Sub(time.Now()) > (60 * time.Second) { + if user.TokenExpiry == 0 || expiry.Sub(time.Now()) > (60*time.Second) { return nil, nil }