File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -70260,6 +70260,7 @@ var GitClient = class {
70260
70260
Log.debug(`"git push" is not able to be run in dryRun mode.`);
70261
70261
throw new DryRunError();
70262
70262
}
70263
+ args = ["-c", "credential.helper=", ...args];
70263
70264
Log.debug("Executing: git", this.sanitizeConsoleOutput(args.join(" ")));
70264
70265
const result = spawnSync(this.gitBinPath, args, {
70265
70266
cwd: this.baseDir,
Original file line number Diff line number Diff line change @@ -65874,6 +65874,7 @@ var GitClient = class {
65874
65874
Log.debug(`"git push" is not able to be run in dryRun mode.`);
65875
65875
throw new DryRunError();
65876
65876
}
65877
+ args = ["-c", "credential.helper=", ...args];
65877
65878
Log.debug("Executing: git", this.sanitizeConsoleOutput(args.join(" ")));
65878
65879
const result = spawnSync(this.gitBinPath, args, {
65879
65880
cwd: this.baseDir,
Original file line number Diff line number Diff line change @@ -17032,6 +17032,7 @@ var GitClient = class {
17032
17032
Log.debug(`"git push" is not able to be run in dryRun mode.`);
17033
17033
throw new DryRunError();
17034
17034
}
17035
+ args = ["-c", "credential.helper=", ...args];
17035
17036
Log.debug("Executing: git", this.sanitizeConsoleOutput(args.join(" ")));
17036
17037
const result = spawnSync(this.gitBinPath, args, {
17037
17038
cwd: this.baseDir,
Original file line number Diff line number Diff line change @@ -63657,6 +63657,7 @@ var GitClient = class {
63657
63657
Log.debug(`"git push" is not able to be run in dryRun mode.`);
63658
63658
throw new DryRunError();
63659
63659
}
63660
+ args = ["-c", "credential.helper=", ...args];
63660
63661
Log.debug("Executing: git", this.sanitizeConsoleOutput(args.join(" ")));
63661
63662
const result = spawnSync(this.gitBinPath, args, {
63662
63663
cwd: this.baseDir,
Original file line number Diff line number Diff line change @@ -157,14 +157,7 @@ export function configureAuthorizedGitClientWithTemporaryToken() {
157
157
} ) ;
158
158
159
159
// Close the socket whenever the command which established it is complete.
160
- registerCompletedFunction ( async ( ) => {
161
- socket . close ( ) ;
162
-
163
- // After the action is done, request it to be forgotten by the local git client as it is no
164
- // longer valid.
165
- const git = await AuthenticatedGitClient . get ( ) ;
166
- git . runGraceful ( [ 'credential' , 'reject' ] , { input : `url=${ git . getRepoGitUrl ( ) } \n\n` } ) ;
167
- } ) ;
160
+ registerCompletedFunction ( ( ) => socket . close ( ) ) ;
168
161
169
162
// When the token is provided via the websocket message, use the token to set up
170
163
// the AuthenticatedGitClient. The token is valid as long as the socket remains open,
Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ export class GitClient {
90
90
throw new DryRunError ( ) ;
91
91
}
92
92
93
+ // Clear the credential helper that is used, preventing the temporary token from being saved as a
94
+ // valid token for future use.
95
+ args = [ '-c' , 'credential.helper=' , ...args ] ;
93
96
// To improve the debugging experience in case something fails, we print all executed Git
94
97
// commands at the DEBUG level to better understand the git actions occurring.
95
98
// Note that we sanitize the command before printing it to the console. We do not want to
You can’t perform that action at this time.
0 commit comments