@@ -812,6 +812,7 @@ def move(
812
812
raise TypeError ("`dandiset` must be a Path when work_on='both'" )
813
813
local_ds , subpath = find_dandiset_and_subpath (dandiset )
814
814
client = DandiAPIClient .for_dandi_instance (dandi_instance )
815
+ client .dandi_authenticate ()
815
816
stack .enter_context (client )
816
817
remote_ds = client .get_dandiset (
817
818
local_ds .identifier , version_id = "draft" , lazy = False
@@ -833,6 +834,7 @@ def move(
833
834
if not isinstance (url , DandisetURL ):
834
835
raise ValueError ("URL does not point to a Dandiset" )
835
836
client = url .get_client ()
837
+ client .dandi_authenticate ()
836
838
stack .enter_context (client )
837
839
rds = url .get_dandiset (client , lazy = False )
838
840
assert rds is not None
@@ -841,6 +843,7 @@ def move(
841
843
else :
842
844
local_ds , subpath = find_dandiset_and_subpath (dandiset )
843
845
client = DandiAPIClient .for_dandi_instance (dandi_instance )
846
+ client .dandi_authenticate ()
844
847
stack .enter_context (client )
845
848
remote_ds = client .get_dandiset (
846
849
local_ds .identifier , version_id = "draft" , lazy = False
@@ -866,8 +869,6 @@ def move(
866
869
if not plan :
867
870
lgr .info ("Nothing to move" )
868
871
return
869
- if not dry_run and client is not None :
870
- client .dandi_authenticate ()
871
872
if devel_debug :
872
873
for gen in mover .process_moves_debug (plan , dry_run ):
873
874
for r in gen :
0 commit comments