Commit f52228df authored by Gao, Shang's avatar Gao, Shang
Browse files

remote auth script is now working

parent 8bfe3475
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class crossbowOlcf(object):
        
        time.sleep(1)

        #export python paths
        #get globus authentication URL
        ssh_stdin, ssh_stdout, ssh_stderr = \
            self.ssh.exec_command("export PATH=/ccs/home/iamshang/anaconda2/bin:/ccs/home/iamshang/anaconda2/lib/python2.7/site-packages:$PATH;\
                                   export PYTHONPATH=/ccs/home/iamshang/crossbow/crossbow:$PYTHONPATH;\
@@ -55,6 +55,7 @@ class crossbowOlcf(object):
        time.sleep(1)
        print 'Please go to this URL and login: %s' % url

        #get auth code and download refresh tokens
        get_input = getattr(__builtins__, 'raw_input', input)
        auth_code = get_input('Please enter the code you get after login here: ').strip()

+2 −2
Original line number Diff line number Diff line
@@ -3,12 +3,12 @@ import pickle
import sys

if len(sys.argv) > 1:
    url = sys.argv[1]
    auth_code = sys.argv[1]
    
    with open('globus_client.pkl', 'rb') as f:
        cbow = pickle.load(f)
    
    cbow._dl_refresh_tokens(url)
    cbow._dl_refresh_tokens(auth_code)

else:
    cbow = crossbowGlobus(api_key="eaabd7d9-3cb4-4014-85fe-73736e658472",init=False)