Commit 3c0a6e4
authored
Fix bearer token authentication for Git clone operations (azure-devops) (#6072)
* fix(azure-devops): fix bearer token auth for Git clone
Bearer tokens from DefaultAzureCredential were failing with 401 because
Git.fromAuth() doesn't handle { token } format. Changed to use basic auth
format like PAT tokens, which Azure DevOps supports for OAuth tokens.
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
* fix(azure-devops): fix bearer token auth for Git clone
Bearer tokens from DefaultAzureCredential were failing with 401 because
Git.fromAuth() doesn't handle { token } format. Changed to use basic auth
format like PAT tokens, which Azure DevOps supports for OAuth tokens.
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
* update test to match the object returned.
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
* revert change of import order
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
* Revert change of import order
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
* revert change
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
* Remove example and reference the documentation:.
Signed-off-by: Tony Hogsten <tony.hogsten@if.se>
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
---------
Signed-off-by: tonyhogsten <tony.hogsten@if.se>
Signed-off-by: Tony Hogsten <tony.hogsten@if.se>1 parent 50a0659 commit 3c0a6e4
File tree
4 files changed
+21
-10
lines changed- workspaces/azure-devops
- .changeset
- plugins/scaffolder-backend-module-azure-devops
- src/actions
4 files changed
+21
-10
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | 105 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
113 | 110 | | |
114 | | - | |
| 111 | + | |
115 | 112 | | |
116 | 113 | | |
117 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
0 commit comments