Commit Graph

55 Commits

Author SHA1 Message Date
Jay McCure 2a19f21289
fix(auth status): better output for auth status 2024-05-21 17:23:49 +10:00
Jay McCure 6a5769d0d4
fix(auth status): exit with code 1 when auth fails 2024-05-01 11:05:28 +10:00
Viacheslav Vasilyev d4663189c2 feat: allow to provide custom client-id 2024-04-24 19:27:12 +00:00
Gary Holtz 5263e4b2a5
refactor: Refactor code that returns buffer contents in tests 2024-03-20 10:55:11 -05:00
Ole Reifschneider f68916a368 fix: git-credential command by using oauth2 user 2023-11-20 11:33:15 +00:00
Gary Holtz ec61b3b18e docs: Adding precedence order to docs 2023-10-20 19:22:54 +00:00
Kai Armstrong 1072a86c84
fix: only show web login for GitLab SaaS 2023-09-21 09:03:32 -05:00
Jamie Tanna 90ff75aabe feat: prefill scope parameter for PAT generation 2023-09-20 16:30:10 +00:00
Jay McCure b28df0b9c5
fix(auth login): use token when logging in 2023-05-11 11:54:38 +10:00
Shekhar Patnaik c9d9138aeb feat(auth login): Add support for OAuth2 2023-05-02 21:25:32 +00:00
Kerri Miller 57ee47eb5c Merge branch 'phikai-newline-auth-status' into 'main'
fix: add newline to auth status command output

Closes #1305

See merge request https://gitlab.com/gitlab-org/cli/-/merge_requests/1232

Merged-by: Kerri Miller <kerrizor@kerrizor.com>
Approved-by: Shekhar Patnaik <spatnaik@gitlab.com>
Approved-by: Kerri Miller <kerrizor@kerrizor.com>
Co-authored-by: Kai Armstrong <karmstrong@gitlab.com>
2023-04-14 20:37:01 +00:00
Kai Armstrong 209cd6c5fc
fix: add newline to auth status command output 2023-04-13 14:04:32 -05:00
Shekhar Patnaik f0a7862f85 chore: update use-keyring flag description 2023-04-12 17:07:23 +00:00
Marek Vospěl 85772c02a7
test: add tests for loading and storing tokens in keyring 2023-04-10 23:56:07 +02:00
Amy Qualls 9fa0976b0b
chore: replace native keyring with os keyring in login argument desc 2023-04-10 23:55:30 +02:00
Marek Vospěl c5f06fd679
feat: add support for token storage in encrypted keychains 2023-04-10 13:35:38 +02:00
Gary Holtz 7999fa80aa chore: fix testing repo to a local GitLab one 2023-04-04 20:53:37 +00:00
Jay McCure 9061fe2870 test(glab auth login): use temp config for test 2023-03-17 16:01:35 +00:00
Vitali Tatarintev c75eef927b refactor(test): use http constants in tests 2023-03-10 18:23:39 +00:00
Kai Armstrong cf0968d56d chore: fix ioutil lint deprecations 2022-11-30 12:45:08 +00:00
Kai Armstrong 39e9e21313 chore: re-add linting/formatting job to ci 2022-11-17 18:36:09 +00:00
Kai Armstrong f95b6ea90c docs: add linting and checks to documentation 2022-10-21 14:38:48 +00:00
Oscar Tovar 40a5436789 chore: update module path 2022-09-19 20:23:45 +00:00
Eduardo Cardoso c05f1036c8
fix: fix validation for GitLab 14.5 tokens (#971) 2022-03-11 01:38:58 +00:00
a333klm dcb07ca39a
fix(authentication): hostnamevalidator accepts folders (#961)
* fix(authentication): hostnamevalidator accepts folders

- the hostname validator did not accept hostnames like localhost:8888/gitlab

Fixes #960

* fix test

Co-authored-by: Clement Sam <clementsam75@gmail.com>
2022-02-28 15:36:56 +00:00
Banst 2455a822f0
fix: weird condition when prompt disabled 2021-10-06 18:51:34 +00:00
addshore d5b819b727 auth login use OverridableDefault 2021-09-24 19:05:36 +01:00
addshore a0136a32ed Login using default hostname string 2021-09-24 19:02:50 +01:00
addshore b8928008b5 Move glinstance to pkg 2021-09-24 18:51:08 +01:00
Seena Fallah 7b5dfbab69 fix: allow token or stdin in non interactive shells
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2021-08-14 21:02:08 +04:30
Clement Sam b0d51cd162 auth/login: fix broken link to personal_access_token 2021-07-04 22:45:54 +00:00
Clement Sam 659108ff9c add tests 2021-05-27 19:05:29 +00:00
Clement Sam 450e9ca8ef fix hostname validator to accept IPs and hosts with port
Resolves #738
2021-05-27 18:03:52 +00:00
Clement Sam 65a7d410e5 fix auth status tests 2021-05-14 05:59:42 +00:00
Clement Sam 7ed4fdbbeb Do not prompt for api_protocol on default gitlab instance 2021-05-12 19:38:17 +00:00
Clement Sam dec8dabdb9 feat: git-credential store hack 2021-05-12 19:38:04 +00:00
Clement Sam b6469686ef feat: more interactive options to auth login
- This allows interactively setting api_protocol and api_host
2021-03-10 20:15:17 +00:00
Clement Sam 36b5140c4b Make linters effective 2021-01-29 11:23:55 +00:00
Clement Sam d52c01a482 refactor: move pkg/api package to /api 2021-01-29 08:43:18 +00:00
Clement Sam b72427d268 switch entirely to ColorPalette 2021-01-29 00:56:45 +00:00
Clement Sam 8352f6e427 reasonably change iostream methods
Change iostreams methods names and references
2021-01-28 23:07:05 +00:00
Clement Sam e4acafd006 refactor: move iostreams to own separate package
- Move iostreams to own separate package
- Fix references to iostream package
- Add StartSpinner and StopSpinner methods
2021-01-28 22:38:32 +00:00
Clement Sam 050e5deda1 test: add more tests for auth status 2021-01-16 14:58:27 +00:00
Clement Sam 191349f63d test: add tests for auth status 2021-01-15 18:44:55 +00:00
Clement Sam d52b76a779 feat: add auth status command 2021-01-15 17:05:35 +00:00
Leo d39c408865 test(commands/auth/login): test official and known external instances 2021-01-05 22:17:46 -03:00
Leo d58cc48901 refactor(commands/auth/login): use backticks instead of double-quotes 2021-01-05 22:17:27 -03:00
Leo 67597d92ea test(commands/auth/login): update tests for new hostnameValidator 2021-01-05 18:08:44 -03:00
Leo a31d711876 refactor(commands/auth/login): use regexp match to validate hostname
According to the linux manual[1] a hostname can only be:

```
Valid characters for hostnames are ASCII(7)
letters from a to z, the digits from 0 to 9, and the hyphen (-).
A hostname may not start with a hyphen.
```

since we also deal with Top-Level-Domains, support a dot.

[1]: https://man7.org/linux/man-pages/man7/hostname.7.html
2021-01-05 18:05:42 -03:00
Leo 9f9c63ba05 test(commands/auth/login): add tests for hostnameValidator() 2021-01-05 14:57:52 -03:00