-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support GitHub Personal Access Tokens #1393
Support GitHub Personal Access Tokens #1393
Conversation
The wiki seems the proper place! Also, should we remove/forbid password authentication to github all the way? Thanks Martin!! |
We should include also the magic expression to set the token via script. Some people script their IDE using startup.st file, Launcher init scripts or other |
@astares Good point. I will explain that too in the wiki. BTW, it's:
|
IIUC: What stops soon is the access to the API for both: v3 (REST) and v4 (GraphQL). BUT when you have the Token, they allow you to use the Token as a password for HTTPS git operations. Then, we can recommend to leave using old user/password credentials for GH but it's not mandatory. The entry in the wiki should explain all this... |
There is another point to discuss, too: What is the default dialog/modal window that pops up when the authentication failed. Even in the branch 1.9, that's not touched... if you open a fresh image, do an operation that requires credentials, then the user/password is what pops up and it would be nice that the user can choose what kind of credential to add. I think we can do it for P9. Like it is in my PR, when this happens, the user has to close the dialog window, add the token in settings, and then re-try the operation (which should work without asking again). But note this is only for GH. I didn't see a deprecation message from other providers such as GitLab or BitBucket. |
@guillep @tesonep I'm reading the Github docs about wiki and see they are versioned by separate... what is the docs/ directory? (my first time with GH's wikis) |
Ah, the github's wiki and the docs/ directory are synchronized using travis! The idea is that when travis runs, there is a - if [[ ${JOB} == "sync-wiki" ]] && [[ ${TRAVIS_BRANCH} == "master" ]] && [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then ./scripts/sync-wiki.sh; fi That job is only run on the master branch and when it is not a pull request. That will call the this script that takes care of pushing all the changes from the docs directory to the wiki. I see two problems with this now:
ideas? |
Thanks foor explaining, I see... As Github repos have the concept of "default branch", I searched in travis environment variables but didn't find something like |
Done in branch dev-1.8: commit 71e12a0 |
@guillep something went wrong with that script:
Source: https://travis-ci.com/github/pharo-vcs/iceberg/jobs/439107332 |
Do we want to have the token in the image instead of the location of the token? |
@StephanEggermont good point. Right now, the tokens are stored exactly as it was done with the passwords. We should take the no-memory approach in both. Do you know if there is an issue created for this? |
I mean, we can merge it like now (GH API doesn't work with password currently), and implement what you propose in a posterior version. |
I don't see an issue for this. And yes, I prefer being able to share images without leaking tokens. Also without leaking absolute paths |
Definitely. |
Intends to fix #1392. Should I write something about this new credentials? where?
Following, the steps to test this PR in a Pharo 9 (there is another issue open for Pharo 8).
First, add a token to the image:
Lastly, you can try the token with this adhoc test in a Workspace:
Maybe we can add create a testing token in some "official account" (e.g. pharo-vcs) and use it from a CI test...
Screenshot: