PIFSC-Protected-Species-Division / cruise-maps-live

This repository contains code necessary to generate daily maps of the cetacean survey cruises
https://storymaps.arcgis.com/stories/b3bbf0e90d0141f7bf47edc5339ccb7a
MIT License
3 stars 0 forks source link

autocommit prompted for github username and password #12

Closed sfregosi closed 1 year ago

sfregosi commented 1 year ago

The scheduled task for running the map worked no problem this AM, but the autocommit task got hung up.

It prompted me for my GitHub username and password. I entered those, and it quickly flashed with some more printout in the command window but then closed before I could see what it said. This DID commit the changes, but it DID NOT push them.

Need to look into this with the alternative task that keeps the cmd window open. May be related to git - Message "Support for password authentication was removed. Please use a personal access token instead." - Stack Overflow

My computer was off on Sunday when this ran fine on Monday/Tuesday. I did restart my computer last night before this morning. Not sure if that is related/there is some sort of time out, but need to dig into it.

For today's run, just manually pushed with GitHub desktop.

sfregosi commented 1 year ago

Same thing happened this AM (7/28). Deleted my old Personal Access Token (PAT) and used that to login in the cmd window when prompted for a password. The PAT was not expired so I'm not sure why it stopped working. Will just keep this issue open while monitoring how it goes during Leg 2.

The best approach might be to save the PAT string somewhere in a text file, and have it ready for the instances when it does need to be re-entered. Still not ideal but it saves from having to create it new each time.

Also of note, @ybarkley did NOT have to set up a PAT when she set up this autocommit task. I know that she works with GitHub directly from within RStudio so I suspect that maybe some global git authentication steps/credentials were maybe set up with that process and so those could be used here.

sfregosi commented 1 year ago

I also updated the PAT in my Windows Credential Manager

sfregosi commented 1 year ago

Ran without needing to put in password in AM on 7/29! Adding for reference tag for others possibly later but otherwise closing because I think this provides a fix. Will add notes on this to the #14 Readme