Open SongZijin opened 1 year ago
My two cents:
While the "Generate new token (classic)" page works, the newer "Generate new token" works just as well, while also having a more intuitive interface (no more of those confusing checkboxes).
For "Generate new token (classic)", you only need to check the "repo" box at the top to get push access. No need of "workflow" and so on.
However, I recommend authenticating with SSH instead, no more pasting the token every time you need to make a push. It shouldn't take more than a few minutes to set this up (just copy all the commands in the linked page, really, and paste them to the terminal). If you are from CEG, we already learned about SSH in CS1010.
@joulev
For "Generate new token (classic)", you only need to check the "repo" box at the top to get push access. No need of "workflow" and so on.
No need of "workflow" and so on. Sure this works?
However, I recommend authenticating with SSH instead, no more pasting the token every time you need to make a push. It shouldn't take more than a few minutes to set this up (just copy all the commands in the linked page, really, and paste them to the terminal).
I am all for SSH authentication. However, the second part shouldn't be the case (i.e., pasting each push). The credential manager should take care of the PAT. However, I am not sure about the implications (read security) of using the credential manager.
@joulev
For "Generate new token (classic)", you only need to check the "repo" box at the top to get push access. No need of "workflow" and so on.
No need of "workflow" and so on. Sure this works?
I haven't generated a token for a long time so I am not 100% sure, but I'm like 95% sure that the "workflow" option is for interacting with GitHub Actions and similar, and is not required for push access.
To be absolutely sure, it's best to consult the documentation at https://docs.github.com but as I'm on mobile right now... sorry I can't link the specific page here.
Please check and confirm, if you can, for the benefit of the class.
I just checked the documentation and as written in here,
repo
is sufficient to get read and write access, hence is sufficient for git push
.
workflow
is for interacting with GitHub Actions workflows, which is a form of CI. For now we don't need it, later in the course it might or might not be necessary when we learn CI? (@okkhoy could you confirm this?)
For workflow
this sentence is interesting:
Workflow files can be committed without [
workflow
] if the same file (with both the same path and contents) exists on another branch in the same repository.
Once again, I really recommend everyone to spend 10 minutes setting up SSH so that you don't have to deal with all this mess.
Thanks! I suppose in my case, since I handle repositories in another module that involves CI, it requires me to setup all these permissions (though I dun remember when I set it up).
Thanks! I suppose in my case, since I handle repositories in another module that involves CI, it requires me to setup all these permissions (though I dun remember when I set it up).
I think from the sentence in the documentation, if you need to create a new workflow or delete a workflow (.github/workflows/*.yml
), you need the workflow
permission. But if you create or delete the file using the GitHub UI (on github dot com) for example, you can then edit the workflows locally without the workflow
permission.
Later on if we will use GitHub Actions for continuous integration, then it is indeed necessary to use workflow
to avoid weird errors that GitHub will give.
I faced some trouble when trying to push my commits, I got some help from Prof and hope this can help more people.
When setting up the account, use [Auth Type: Basic] and your GitHub username. For the password, instead of using your GitHub password, you would need to create a Personal Access Token on GitHub, through the following steps: