mirror of
https://github.com/MichaelMure/git-bug.git
synced 2025-01-06 01:44:27 +03:00
Fix GitLab showing https:/../personal_access_token
Using path.Join() to concatenate URLs doesn't really make sense, and in particular will change "//" to "/".
This commit is contained in:
parent
1eaf3ec0cb
commit
f50aea486b
@ -3,7 +3,6 @@ package gitlab
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -195,7 +194,7 @@ func promptTokenOptions(repo repository.RepoKeyring, login, baseUrl string) (aut
|
|||||||
}
|
}
|
||||||
|
|
||||||
func promptToken(baseUrl string) (*auth.Token, error) {
|
func promptToken(baseUrl string) (*auth.Token, error) {
|
||||||
fmt.Printf("You can generate a new token by visiting %s.\n", path.Join(baseUrl, "profile/personal_access_tokens"))
|
fmt.Printf("You can generate a new token by visiting %s.\n", strings.TrimSuffix(baseUrl, "/")+"/profile/personal_access_tokens")
|
||||||
fmt.Println("Choose 'Create personal access token' and set the necessary access scope for your repository.")
|
fmt.Println("Choose 'Create personal access token' and set the necessary access scope for your repository.")
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Println("'api' access scope: to be able to make api calls")
|
fmt.Println("'api' access scope: to be able to make api calls")
|
||||||
|
Loading…
Reference in New Issue
Block a user