Loris Bennett <loris.benn...@fu-berlin.de> writes: > Loris Bennett <loris.benn...@fu-berlin.de> writes: > >> Hi Kenneth, >> >> Kenneth Hoste <kenneth.ho...@ugent.be> writes: >> >>> Hi Loris, >>> >>> Two things are needed in order for --new-pr to work: >>> >>> 1) You need a GitHub token available, which allows EasyBuild to take care of >>> actually opening the pull request for you (it basically avoids having to >>> use the >>> GitHub web interface for doing that); >>> >>> 2) You need to have an SSH key available that allows you to push a branch in >>> your fork of the easybuild-easyconfigs GitHub repository. >>> >>> In your case, 2) is fine, 1) is not (as shown by --check-github). >>> >>> >>> There's a variety of reasons why the token may not be available: >>> >>> Do you have 'keyring' Python package installed? Check with "python -c >>> 'import >>> keyring'. >> >> This works. >> >>> Is the token installed in this account? (if not, use "eb >>> --install-github-token") >> >> Yes. >> >>> Is keyring able to access the saved token? >>> If your keyring installation is recent enough, you can try getting the saved >>> token using: >>> >>> python -m keyring get github_token GITHUB_USER >>> >>> (where you replace GITHUB_USER_NAME with, you guessed it, your GitHub user >>> name) >> >> That gave the error >> >> /usr/bin/python: No module named keyring.__main__; 'keyring' is a package >> and cannot be directly executed >> >> but was able to do the following (which you sent me last time I was >> struggling with the Github integration): >> >> [build@admin ~]$ python >> Python 2.7.5 (default, Nov 16 2020, 22:23:17) >> [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import getpass, keyring >> >>> keyring.get_password("github_token", "tardigradus") >> Please enter password for encrypted keyring: >> u'my_secret_token' >> >>> Note: if you share the results of these tests, be careful to not >>> accidentally >>> share your GitHub token... ;) >> >> So everything seems to work. Even the new PR was created, but I just >> seem to be getting spurious error messages. Very odd. > > So I am still have problem that EasyBuild misleadingly claims that > GitLab integration is not set up. I had forgotten that this problem had > occurred quite recently and thought that GitHub had somehow disabled my > token. So I created a new one and registered it (which required me to > install 'keyring' and 'pycrypto' for Python 3). Registration went > fine, but --check-github says > > * GitHub user...tardigradus => OK > Please enter password for encrypted keyring: > * GitHub token...(no token found) => FAIL > * git command...OK ("git version 1.8.3.1; ") > * GitPython module...OK (GitPython version 1.0.2) > * push access to tardigradus/easybuild-easyconfigs repo @ GitHub...OK > * creating gists...FAIL (gist_url: None) > * location to Git working dirs... OK (/trinity/home/build/easyconfigs/~/git) > > However, --new-pr sort of works. I just had to log into GitHub and > click on a button labelled something like "Create pull request" to > actually complete the process. > > Is maybe the ancient version of Git to blame?
Same error with a more recent versio: * GitHub token...(no token found) => FAIL * git command...OK ("git version 2.33.0; ") > Cheers, > > Loris > >> Cheers, >> >> Loris >> >>> >>> >>> regards, >>> >>> Kenneth >>> >>> On 08/06/2022 15:18, Loris Bennett wrote: >>>> Hi, >>>> In the past I have successfully submitted new PRs. However, when I tried >>>> today, I got: >>>> [build@admin ~]$ eb --new-pr --git-working-dirs-path=~/git >>>> --github-user=tardigradus --pr-commit-msg="{data}[foss-2021b] RStan >>>> v2.21.5 w/ >>>> R 4.1.2" ~/easyconfigs/RStan-2.21.5-foss-2021b-R-4.1.2.eb >>>> == Temporary log file in case of crash >>>> /tmp/eb-mp19jq6s/easybuild-_u_eolj6.log >>>> == found valid index for >>>> /trinity/shared/easybuild/software/EasyBuild/4.5.5/easybuild/easyconfigs, >>>> so using it... >>>> == found valid index for >>>> /trinity/shared/easybuild/software/EasyBuild/4.5.5/easybuild/easyconfigs, >>>> so using it... >>>> == fetching branch 'develop' from >>>> https://github.com/easybuilders/easybuild-easyconfigs.git>> == copying >>>> files to /tmp/eb-mp19jq6s/git-working-dir9yzypblw/easybuild-easyconfigs... >>>> == pushing branch '20220608140722_new_pr_RStan2215' to remote >>>> 'github_tardigradus_SbVOR' >>>> (g...@github.com:tardigradus/easybuild-easyconfigs.git) >>>> ERROR: GitHub token for user 'tardigradus' must be available to open a >>>> pull request >>>> Running >>>> eb --check-github --github-user=tardigradus >>>> gave >>>> == Temporary log file in case of crash >>>> /tmp/eb-qoptphw6/easybuild-t_h6dk5i.log >>>> Checking status of GitHub integration... >>>> Making sure we're online...OK >>>> * GitHub user...tardigradus => OK >>>> * GitHub token...(no token found) => FAIL >>>> * git command...OK ("git version 1.8.3.1; ") >>>> * GitPython module...OK (GitPython version 1.0.2) >>>> * push access to tardigradus/easybuild-easyconfigs repo @ GitHub...OK >>>> * creating gists...FAIL (gist_url: None) >>>> * location to Git working dirs... not found (suboptimal) >>>> I thought the token was needed primarily for the push, which worked. To >>>> actually create the PR I had to press a button in Github, which I don't >>>> remember having done in the past. >>>> Does anyone know what the issue might be? >>>> Cheers, >>>> Loris >>>> -- Dr. Loris Bennett (Herr/Mr) ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de