liberapay / git-lfs-fetch.py

Lightweight Git Large File Storage fetcher written in python
31 stars 13 forks source link

Updates to acquire auth tokens for GHE LFS operations. #5

Closed lhasadad closed 7 years ago

lhasadad commented 7 years ago

Updates for GHE token acquisition.

list of changes:

  1. cleaned up a few pep 8 issues
  2. adjusted some imports that were problematic in eclipse pydev environment. seem to work fine in use.
  3. in get_lfs_endpoint_url, adjust it to not overload the 'url' variable
  4. adjusted /objects/batch call to pick up the initial token to use for that call in GHI
  5. adjusted the downloads to use the auth tokens associated with the items to download.
  6. Added extra debug lines.
  7. Changed some code to allow for possible running on windows system (though was not able to get it to work because the behavior of the os.rename was 'odd' (the rename file would disappear before the copy to working dir happened, needs further work to make work right)

Note, I did not update any of the distro version stuff. I could but figured that might be something you would rather do.

Let me known if you want any changes or have questions.

lhasadad commented 7 years ago

@Changaco I responded with some questions and throughts. let me know what you think and I will proceed.

lhasadad commented 7 years ago

fyi, I noticed a problem I had introduced on the urlsplit handling (url_split.host vs url_split.hostname (correct)) That will be in the next commit against the branch.

lhasadad commented 7 years ago

updated with new commit to address issues raised.

lhasadad commented 7 years ago

Looks, good will give it a try in our environment and respond shortly

lhasadad commented 7 years ago

Tried it, looks good and did as expected.