Answer the question
In order to leave comments, you need to log in
How to connect Yandex.disk to Mac via command line?
I'm trying like this:
mkdir /Volumes/temp
mount_webdav davs://[email protected]:443 /Volumes/temp
Answer the question
In order to leave comments, you need to log in
Create a script mount_yadisk
with the following content:
#!/usr/bin/expect -f
#
# Usage: mount_yadisk <node> <username> <password>
if {$argc!=3} then {
send_tty "Usage: mount_yadisk <node> <username> <password>\n"
exit 1
}
set timeout 15
set node [lindex $argv 0]
set username [lindex $argv 1]
set password [lindex $argv 2]
log_user 0
if {!([file exists "$node"])} then {
exec mkdir "$node"
}
spawn mount_webdav -i -s -v "Yandex.Disk" "https://webdav.yandex.ru:443" "$node"
expect {
"Username:" { send "$username\n"; exp_continue }
"Password:" { send "$password\n" }
}
chmod +x mount_yadisk
. mount_yadisk /Volumes/YandexDisk username password
mount_webdav -i https://webdav.yandex.ru:443 /Volumes/temp
mount_webdav https://myusername:[email protected]:443 /Volumes/temp
mount_webdav -s https://myusername:[email protected]:443 /Volumes/temp
The connection to Yandex Disk has been checked and is working.
set pause to (3)
delay pause
tell application "Finder"
mount volume "Https://webdav.yandex.ru/" as user name ¬
"username" with password "password"
end tell
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question