-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved RegistryAuthLocator and added tests for Windows (#868)
#756 tested on Windows. Fixed RegistryAuthLocatorTest on Windows and also allowed better fallbacks from running credential provider (to allow lookup alternative AuthConfigs), when: 1) there is no hostName, then there is no point to ask credentials 2) when credential helper response with "credentials not found in native keychain" to try other resources Main reason for failing for me on Windows machine was #710 changes. When i used Netty or OkHttp together with npipe, then it worked fine. Yesterday evening i found out the reason and today morning i found also fix in master for that :-) - #865, breaking docker response by line breaks.
- Loading branch information
Showing
4 changed files
with
197 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
core/src/test/resources/auth-config/win/docker-credential-fake.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@echo off | ||
if not "%1" == "get" ( | ||
exit 1 | ||
) | ||
|
||
set /p inputLine="" | ||
|
||
if "%inputLine%" == "registry2.example.com" ( | ||
echo Fake credentials not found on credentials store '%inputLine%' 1>&2 | ||
exit 1 | ||
) | ||
if "%inputLine%" == "https://not.a.real.registry/url" ( | ||
echo Fake credentials not found on credentials store '%inputLine%' 1>&2 | ||
exit 1 | ||
) | ||
|
||
echo { | ||
echo "ServerURL": "url", | ||
echo "Username": "username", | ||
echo "Secret": "secret" | ||
echo } |