user
04/28/2022, 7:14 AMlakefs_client.exceptions.UnauthorizedException: (401)
What am I missing? Isn't specifying the username and password sufficient to connect to LakeFS instance running on docker?user
04/28/2022, 7:22 AMuser
04/28/2022, 7:23 AMuser
04/28/2022, 7:25 AMuser
04/28/2022, 7:31 AMuser
04/28/2022, 7:33 AMuser
04/28/2022, 7:34 AMimport lakefs_client
from lakefs_client import models
from lakefs_client.client import LakeFSClient
configuration = lakefs_client.Configuration()
configuration.username = "XXX"
configuration.password = "XXX"
configuration.host = "<http://127.0.0.1:8000|http://127.0.0.1:8000>"
client = LakeFSClient(configuration)
repo = models.RepositoryCreation(name="lakefs-demo-repo",
storage_namespace="<local://lakefs-demo-repo|local://lakefs-demo-repo>",
default_branch="main")
client.repositories.create_repository(repo)
client.branches.list_branches("lakefs-demo-repo")
user
04/28/2022, 7:39 AMuser
04/28/2022, 7:50 AMuser
04/28/2022, 7:56 AMuser
04/28/2022, 7:58 AMuser
04/28/2022, 8:36 AMuser
04/28/2022, 8:36 AMuser
04/28/2022, 6:24 PMlakectl.yaml
to my homedir, however as I created new pairs of secret access keys, I didn't update the yaml file with new keys. I guess this explains the authentication error.user
04/28/2022, 6:43 PMlakectl.yaml
file (I.e, there could be any credentials there or none), it only uses the credentials you explicitly passed to it in the code. I will test this (i.e. pass bad credentials in the lakectl file and the proper ones in the python code) and update my findings here.user
04/28/2022, 7:20 PMlakectl.yaml
and the proper credentials to the python file, it worked just fine and created the necessary repo. As of now, this does not seem to be a bug in my opinion.
In any case, Enjoy your lakeFS journey😄jumping lakefs.user
04/28/2022, 7:21 PM