0

I am running git 2.92 with latest git-lfs on some "login server" that has an older Redhat installation ( 2.6.32-504.8.1.el6.x86_64 #1 SMP Fri Dec 19 12:09:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux )

We recently moved our repositories from SVN to GIT, and that includes a lot of files which are now in a binary repository.

When I do a checkout on my local Ubuntu, and setup git-lfs; everything works nicely.

But when I run the same procedure on that remote server, the actual checkout will ask me twice for my password - for each file that git-lfs is responsible for.

I added

git config credential.helper 'cache --timeout=3600' 

to the repository config; but no change.

Any idea, anybody?

0

Not a solution, but a workaround - a python script that simply loops and "expects" requests for passwords ... and provides them; until EOF.

#!/usr/bin/env python3

import pexpect
import sys

def main():
  command = input("Enter the command to invoke: ")
  password = input("Enter the password to send: ")

  child = pexpect.spawn(command)
  counter = 0

  while True:
    try:
        expectAndSendPassword(child, password)
        counter = logAndIncreaseCounter(counter)
    except pexpect.EOF:
        print("Received EOF - exiting now!")
        sys.exit(0)

def expectAndSendPassword(child, password):
  child.expect("Password .*")
  child.sendline(password)

def logAndIncreaseCounter(counter):
  print("Sent password ... count: {}".format(counter))
  return counter + 1

main()

If anybody finds that helpful, feel free to upvote ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.