Wanchai / FTPbucket

FTPbucket is a PHP script that enables you to sync your BitBucket or GitHub repository with any web-server
102 stars 22 forks source link

2Factor Authentication w/ Github = failed uploads #14

Open xenostar opened 7 years ago

xenostar commented 7 years ago

I know this repo isn't exactly updated much anymore, but has anyone thought about the issue of 2FA? Any Github account that has 2FA enabled doesn't work with this script. Here is an error I got in the logfile.txt:

27.04.2017, 13:44:16: Script called for a GitHub payload
27.04.2017, 13:44:16: Received a push from {in-ajsop}
27.04.2017, 13:44:16: Commencing transfer for this branch.....
27.04.2017, 13:44:16: Created new directory assets/css
27.04.2017, 13:44:16: Cant't get the file assets/css/master.min.css - error code : 404 - cURL error: 
27.04.2017, 13:44:16: Cant't get the file assets/css/master.min.css.map - error code : 404 - cURL error: 
27.04.2017, 13:44:16: Transfer done for branch {master}

27.04.2017, 13:52:07: Script called for a GitHub payload
27.04.2017, 13:52:07: Received a push from {in-ajsop}
27.04.2017, 13:52:07: Commencing transfer for this branch.....
27.04.2017, 13:52:08: Uploaded: ../wp-content/themes/xenotheme_v3/assets/css/master.min.css
27.04.2017, 13:52:08: Uploaded: ../wp-content/themes/xenotheme_v3/assets/css/master.min.css.map
27.04.2017, 13:52:08: Transfer done for branch {master}

The first attempt is with 2FA enabled, the second without it on my account. Only with 2FA disabled does it work correctly. At the very least, I think it should throw some sort of error to indicate it wasn't able to connect, but I had to search around until I finally figured out what it was.

Any ideas?

d2roth commented 7 years ago

@xenostar What about creating an access token https://github.com/settings/tokens and using that instead of your password. I believe it will do the same trick.