File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export const GitErrorRegexes: { [regexp: string]: GitError } = {
69
69
GitError . BadConfigValue ,
70
70
'ERROR: ([\\s\\S]+?)\\n+\\[EPOLICYKEYAGE\\]\\n+fatal: Could not read from remote repository.' :
71
71
GitError . SSHKeyAuditUnverified ,
72
- "fatal: Authentication failed for 'https://" :
72
+ "fatal: Authentication failed for 'https? ://" :
73
73
GitError . HTTPSAuthenticationFailed ,
74
74
'fatal: Authentication failed' : GitError . SSHAuthenticationFailed ,
75
75
'fatal: Could not read from remote repository.' : GitError . SSHPermissionDenied ,
Original file line number Diff line number Diff line change @@ -287,7 +287,21 @@ describe('git-process', () => {
287
287
expect ( ( error as any ) . code ) . toBe ( RepositoryDoesNotExistErrorCode )
288
288
} )
289
289
290
- it ( 'can parse errors' , ( ) => {
290
+ it ( 'can parse HTTPS auth errors' , ( ) => {
291
+ const error = GitProcess . parseError (
292
+ "fatal: Authentication failed for 'https://www.github.com/shiftkey/desktop.git/'"
293
+ )
294
+ expect ( error ) . toBe ( GitError . HTTPSAuthenticationFailed )
295
+ } )
296
+
297
+ it ( 'can parse HTTP auth errors' , ( ) => {
298
+ const error = GitProcess . parseError (
299
+ "fatal: Authentication failed for 'http://localhost:3000'"
300
+ )
301
+ expect ( error ) . toBe ( GitError . HTTPSAuthenticationFailed )
302
+ } )
303
+
304
+ it ( 'can parse SSH auth errors' , ( ) => {
291
305
const error = GitProcess . parseError ( 'fatal: Authentication failed' )
292
306
expect ( error ) . toBe ( GitError . SSHAuthenticationFailed )
293
307
} )
You can’t perform that action at this time.
0 commit comments