Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-02-15 10:22:36

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

GitHub access

I’ve been putting off these warnings from GitHub about password access no longer working soon, but I’m frankly a little confused about what I should be doing instead.

One option — the recommended, apparently — is to create an access token. But when you drill into to where to create one on the ‘New personal access token’ page, you get this long list of checkboxes for a myriad of different things that I have no clue whether I need or not.

Can anyone who has resigned themselves to stay with GitHub shed some light on what is the simple way forward here for a personal account with repos?

Also, once I have an access key, what am I supposed to do with it?

Also, is there a different process for an ‘organization’? I may need to kill the CSF org (which I’m happy to do) to avoid overly complex access boolsheet.

Offline

#2 2021-02-15 11:22:00

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: GitHub access

This only really affects you if using command-line git. If you are using their GitHub Desktop app then it’ll carry on as normal as that automatically sets up a token on install.

You will still log into GitHub’s website using your normal password. Although you may need to set up 2 factor authentication (I’m unsure if that’s a requirement, as I already login that way).

More info here.

Offline

#3 2021-02-15 12:30:52

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: GitHub access

Thank you, Phil. That’s good to know in the meantime. I should setup the two-factor, I guess.

I do want to start using command-line git, to ween myself off of the electron client, so I guess I should push forward with figuring this out.

I just wish I knew what range of check boxes to click.

For example, what would I need to check to keep contributing to Txp’s repos, if anything… I don’t know.

Offline

#4 2021-02-15 12:54:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website GitHub

Re: GitHub access

I haven’t bothered with 2FA because it gets on my wick, but I’m using keys (at least I think I am!) with the command line.

All I did was go to my Github account Settings->Developer options and created a new Personal Access Token called ‘Repo access’. I seem to recall copying that and then initiating a clone command via HTTPS, which prompted me for my username and the key as password. I supplied them, it authenticated and then I told the macOS keychain helper to supply it each time. Done.

Edit: Here’s my settings:

Last edited by Bloke (2021-02-15 12:59:35)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2021-02-15 13:28:51

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,198
Website

Re: GitHub access

philwareham wrote #328880:

[…] 2 factor authentication (I’m unsure if that’s a requirement, as I already login that way).

So far, accessing the GH website has not required 2FA. luckily.

But out of curiosity, what did you use do set up 2FA?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#6 2021-02-15 15:49:31

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: GitHub access

phiw13 wrote #328885:

But out of curiosity, what did you use do set up 2FA?

My phone with an SMS text. I’ve used the Google Authenticator app previously but find that more annoying to use than a text message to my phone.

Offline

#7 2021-02-15 18:07:49

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: GitHub access

phiw13 wrote #328885:

But out of curiosity, what did you use do set up 2FA?

I’ve used Authy for years – including with Github.

Offline

#8 2021-02-16 03:04:27

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,198
Website

Re: GitHub access

philwareham wrote #328886:

My phone with an SMS text.

That maybe a problem for me, I am not sure I can receive a SMS text on my iPhone (using a data-only cellular plan).

michaelkpate wrote #328887:

I’ve used Authy for years – including with Github.

Thanks for that, it seems GH in combination with Authy does not use SMS messages. I will investigate when health is back to less dis-functional.

(BTW and totally OT, did you get Authy to work for the Dreamhost account login?)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#9 2021-02-16 10:47:30

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,266
GitHub

Re: GitHub access

philwareham wrote #328886:

I’ve used the Google Authenticator app previously but find that more annoying to use than a text message to my phone.

1Password can be your friend here. It’s very good.

support.1password.com/one-time-passwords/

Offline

#10 2021-02-17 08:52:46

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: GitHub access

Bloke wrote #328884:

All I did was …

Thanks, Bloke. Noted for the near future.

To other comments in general, a few precisions from my experience…

I kept getting the ‘password will no longer work’ warnings whenever just logging into a repo via the website. They send me email notices each time saying passwords will no longer work beginning August. Accounts will become ‘brown’ (shit?) accounts. That’s still a bit off but the constant haranguing about it is annoying.

I tried looking into the app-assisted approach (I tried 1password), which they seem to recommend over 2FA, but when shown the barcode/Qcode thing you’re supposed to read, and reading it with my phone’s camera, it kept saying there was nothing in it. And when I clicked the link they provided if the barcode didn’t work, to paste in a string ‘six characters’ long, I would get a string that was about 15 chars instead and that failed too.

Oh, and I opened 1password and had no clue how to use it in relation to reading barcodes or 2FA. There is nothing in the phone app that makes it clear how to do it.

So I said ‘F*** that shiza!’ and went to setting up 2FA via sms, which means giving my phone number, but at least it worked easy as expected.

Keeping my access keys on local machine in a text file, but that’s probably not smart with my old machine.. Every day I worry it will give up the ghost.

Quite a miserable railroading experience, frankly.

Offline

#11 2021-02-17 09:02:26

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: GitHub access

Also, do they call you a ‘developer’ because you are fetching and committing with git from the command line in that case instead of the client.

I mean, really, if you are not already a GitHub power user, and I’m certainly not, this changeover process could not be more confusing for what they actually recommend.

Offline

#12 2021-02-17 16:22:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website GitHub

Re: GitHub access

No idea about why they call you a dev but I feel for you about the 2FA crap. It really is a joke.

Anyway, since you want to get into the command line side of things, here’s my 5-minute primer. I only use a tiny subset of the commands from day-to-day so here we go:

Set up defaults

$ git config --list // Show current settings
$ git config --global user.name "Your name"
$ git config --global user.email "you@example.com"

Start a new project

Create a new repo on GitHub called dw_some_project. Then at your command line…

$ mkdir dw_some_project
$ cd dw_some_project
$ git init

Commit stuff

$ git pull // If there are any changes made upstream on the server to grab
<make changes to some_file.php and another_file.php>
$ git status // to see what's changed
$ git diff // to review the changes to existing files
$ git add some_file.php another_file.php // or use pattern matching: git add *.php
<repeat as many git add commands as you want in this commit to "stage" them ready for committing>
$ git status // Show what's ready - staged - to be committed (in green) and omitted (in red)
$ git commit
<pops up your editor so you can put a commit message. 80-char primary, then whatever else you want after that on any number of lines> Save changes in your editor.
$ git push // to shove the changes to GitHub
If first commit to the project, you need:
$ git push -u origin main // push and start tracking changes

Make a branch

$ git checkout -b my-branch
Work on files, commit as above, minus git push (unless you really want to publish your branch separately).

Merge a branch into main

When you’re done in your branch and want to pull all the changes you’ve committed from the branch into the main branch.

$ git status // Ensure everything is committed and you are "on the branch"
$ git checkout main // Switch back to the main branch ready to receive changes
$ git merge my-branch // It'll tell you if there are conflicts that need resolving
Assuming everything merged correctly:
$ git push // push to server
$ git branch -d my-branch // tidy up and delete local branch

Other useful things

$ git branch // List all branches
$ git remote --v // List what remote your project is tracking on GitHub
$ git clone https://github.com/wion/project-name // Drag project to client and make it git
$ git gc // Garbage collect - clean up objects every now and again to prune things and keep it fast
$ git log // Show commit history
$ git show 1245abfe22 // View specific changes in this commit
$ git checkout -- <file> // To immediately discard local changes to <file>
$ git reset HEAD <file> // To unstage a file that you've added by mistake - perhaps by an over-zealous wildcard

You can also add (and commit) a file called .gitignore and populate it with wildcards and files that you want git to ignore (i.e. not show you as ‘unstaged’ or ‘not yet added’). One file / pattern per line. Here’s a good starter I use for most repos:

.DS_Store
.DS_Store?
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
*~

Hope that helps!

Last edited by Bloke (2021-02-17 17:35:36)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB