Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
bc84ed11
Kaydet (Commit)
bc84ed11
authored
Kas 30, 2018
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix empty authconfig detection
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
c344660f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
build.py
docker/api/build.py
+2
-2
daemon.py
docker/api/daemon.py
+1
-1
auth.py
docker/auth.py
+7
-1
No files found.
docker/api/build.py
Dosyayı görüntüle @
bc84ed11
...
@@ -286,10 +286,10 @@ class BuildApiMixin(object):
...
@@ -286,10 +286,10 @@ class BuildApiMixin(object):
# If we don't have any auth data so far, try reloading the config
# If we don't have any auth data so far, try reloading the config
# file one more time in case anything showed up in there.
# file one more time in case anything showed up in there.
if
not
self
.
_auth_configs
:
if
not
self
.
_auth_configs
or
self
.
_auth_configs
.
is_empty
:
log
.
debug
(
"No auth config in memory - loading from filesystem"
)
log
.
debug
(
"No auth config in memory - loading from filesystem"
)
self
.
_auth_configs
=
auth
.
load_config
(
self
.
_auth_configs
=
auth
.
load_config
(
creds
ore_env
=
self
.
creds
ore_env
creds
tore_env
=
self
.
credst
ore_env
)
)
# Send the full auth configuration (if any exists), since the build
# Send the full auth configuration (if any exists), since the build
...
...
docker/api/daemon.py
Dosyayı görüntüle @
bc84ed11
...
@@ -127,7 +127,7 @@ class DaemonApiMixin(object):
...
@@ -127,7 +127,7 @@ class DaemonApiMixin(object):
self
.
_auth_configs
=
auth
.
load_config
(
self
.
_auth_configs
=
auth
.
load_config
(
dockercfg_path
,
credstore_env
=
self
.
credstore_env
dockercfg_path
,
credstore_env
=
self
.
credstore_env
)
)
elif
not
self
.
_auth_configs
:
elif
not
self
.
_auth_configs
or
self
.
_auth_configs
.
is_empty
:
self
.
_auth_configs
=
auth
.
load_config
(
self
.
_auth_configs
=
auth
.
load_config
(
credstore_env
=
self
.
credstore_env
credstore_env
=
self
.
credstore_env
)
)
...
...
docker/auth.py
Dosyayı görüntüle @
bc84ed11
...
@@ -39,7 +39,7 @@ def resolve_index_name(index_name):
...
@@ -39,7 +39,7 @@ def resolve_index_name(index_name):
def
get_config_header
(
client
,
registry
):
def
get_config_header
(
client
,
registry
):
log
.
debug
(
'Looking for auth config'
)
log
.
debug
(
'Looking for auth config'
)
if
not
client
.
_auth_configs
:
if
not
client
.
_auth_configs
or
client
.
_auth_configs
.
is_empty
:
log
.
debug
(
log
.
debug
(
"No auth config in memory - loading from filesystem"
"No auth config in memory - loading from filesystem"
)
)
...
@@ -212,6 +212,12 @@ class AuthConfig(dict):
...
@@ -212,6 +212,12 @@ class AuthConfig(dict):
def
cred_helpers
(
self
):
def
cred_helpers
(
self
):
return
self
.
get
(
'credHelpers'
,
{})
return
self
.
get
(
'credHelpers'
,
{})
@property
def
is_empty
(
self
):
return
(
not
self
.
auths
and
not
self
.
creds_store
and
not
self
.
cred_helpers
)
def
resolve_authconfig
(
self
,
registry
=
None
):
def
resolve_authconfig
(
self
,
registry
=
None
):
"""
"""
Returns the authentication data from the given auth configuration for a
Returns the authentication data from the given auth configuration for a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment