If you install AzCopy on your recent Linux distribution, the
azcopy login command might work right off the bat. However, there's a good chance that won't, it there's a much greater chance even that it will stop working.
When the AzCopy login fails, it'll fail like this:
azcopy loginin the command line
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code AYJDDEJFL to authenticate.
Failed to perform login command: failed to get keyring during saving token, key has been revoked NOTE: If your credential was created in the last 5 minutes, please wait a few minutes and try again.
Once you see the failure, azcopy will never recover and you'll never be able to log in like that from the same host. Unless you do something that I'll describe in the next section.
This problem happened to me on Ubuntu 18.04, but a little research shows that it's been happening on other Linux distributions as well.
Make sure that
keyctl is installed. If it's not, and you're running Ubuntu (or some variant thereof, such as Kubuntu), you can install the program like this:
sudo apt install keyutils
To solve the login issue, just run the following command:
That's it! Now
azcopy login will work as expected.
Thanks to Jacob Warwick for his comment on the GitHub issue "azcopy login - ADLS Gen2 - "failed to perform login command, failed to get keyring during saving token, function not implemented".
You can learn more about the latest version of AzCopy and download the software at Microsoft's AzCopy page: Get Started with AzCopy