Loris Bennett <[email protected]> writes:

> Loris Bennett <[email protected]> writes:
>
>> Dear Kenneth,
>>
>> Here's the relevant part of the log:
>>
>>   == 2020-03-06 07:37:29,260 build_log.py:265 INFO * GitHub user...
>>   * GitHub user...== 2020-03-06 07:37:29,260 build_log.py:265 INFO 
>> tardigradus => OK
>>   tardigradus => OK
>>   == 2020-03-06 07:37:29,260 build_log.py:265 INFO * GitHub token...
>>   * GitHub token...== 2020-03-06 07:37:29,261 github.py:1816 WARNING Failed 
>> to obtain GitHub token for tardigradus
>>   Use the following procedure to install a GitHub token in your keyring:
>>   $ python -c 'import getpass, keyring; keyring.set_password("github_token", 
>> "tardigradus", getpass.getpass())'
>>   == 2020-03-06 07:37:29,261 build_log.py:265 INFO (no token found) => FAIL
>>   (no token found) => FAIL
>>
>> The string 'fetch_github_token' doesn't occur in the log file.
>>
>> Is that any help?
>
> The problem seems to be with the keyring mechanism.  I needed to do an 
> explicit
>
>   python -c 'import getpass, keyring; keyring.set_password("github_token", 
> "tardigradus", getpass.getpass())'
>
> to set up the keyring.  This now works with a password challenge on my admin 
> node:
>
>   * GitHub user...tardigradus => OK
>   Please enter password for encrypted keyring: * GitHub token...
>   abc..123 (len: 40) => OK (validated)
>   * git command...OK ("git version 1.8.3.1; ")
>   * GitPython module...OK (GitPython version 2.1.15)
>   * push access to tardigradus/easybuild-easyconfigs repo @ GitHub...OK
>   * creating gists...OK
>   * location to Git working dirs... not found (suboptimal)
>
>   All checks PASSed!
>
>   Status of GitHub integration:
>   * --from-pr: OK
>   * --new-pr: OK
>   * --review-pr: OK
>   * --update-pr: OK
>   * --upload-test-report: OK
>
> However, I also want to be able start interactive jobs on GPU nodes via
> the resource manger.  In this case, I log into the login node via SSH as
> user 'build', as I do for the admin node, but the Github check now fails
> without prompting for the keyring password.  The same /home/build is
> mounted on both systems.
>
> I assume there is some step I did before the weekend on the admin node
> which I have forgotten about and now need to do on the login node.  Can
> anyone see what it is?

The difference between the two systems was the following.  On the one
where --check-github worked I had

  >>> import keyring
  >>> keyring.get_keyring()
  <keyring.backends.file.EncryptedKeyring object at 0x2aaabc554990>

On the one where getting the token failed I had

  >>> import keyring
  >>> keyring.get_keyring()
  <keyring.backends.file.PlaintextKeyring object at 0x2aaab8e88110>

The second system was missing the package (for CentOS 7)

  python2-crypto

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email [email protected]

Reply via email to