Skip to content
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

API authentication method call deprecated #97

Closed
Bilge opened this issue Feb 4, 2020 · 15 comments
Closed

API authentication method call deprecated #97

Bilge opened this issue Feb 4, 2020 · 15 comments

Comments

@Bilge
Copy link
Contributor

Bilge commented Feb 4, 2020

GitHub has started emailing users who call their API with the deprecated URL authorization scheme.

Please use the Authorization HTTP header instead, as using the access_token query parameter is deprecated.

More information.

@starwarsfan
Copy link

Same here, also got the GitHub notification mails...

@JavidPack
Copy link

It would be great if someone forks this and fixes this issue. There are no maintainers on this project anymore it appears, and this twice a week email will be scary for my end-users. If someone does fork this to fix this, please comment here so we can be informed.

@kevinburke1
Copy link
Contributor

I'm working on this now. The main problem is Github now requires you to send the username corresponding to the access token, which means we need to change the project API. GITHUB_USER is used to refer to the project being downloaded, uploaded, or released, so we need a different variable or format for this.

@tucksaun
Copy link

tucksaun commented Feb 13, 2020

@kevinburkemeter actually you don't: sending the token base64 encoded as a basic authentication header works. You can also do Authorization: token <value>.

@kevinburke1
Copy link
Contributor

Oh! OK, let me try that.

kevinburke1 added a commit to meterup/github-release that referenced this issue Feb 13, 2020
Port the Client implementation to use github.com/kevinburke/rest,
which gives us inspection of the HTTP request/response, user agents
and basic auth out of the box, without needing to set those every
time. Most of the rest of the code remains the same.

Move the VERSION constant into the github subpackage (from the main
package) so we can use it there.

Fixes github-release#95.
Fixes github-release#97.
@kevinburke1
Copy link
Contributor

OK, just pushed a fix to github.com/meterup/github-release, as well as a 0.7.4 release. Please try it out! https://github.com/meterup/github-release/releases/tag/v0.7.4

@kevinburke1
Copy link
Contributor

Same API, no need to pass in an auth username, but you can if you want.

@gdm85
Copy link

gdm85 commented Feb 14, 2020

I had an older fork at https://github.com/gdm85/github-release; I will also add support like @kevinburkemeter did but without introducing the github.com/kevinburke/rest dependency.

@Bilge
Copy link
Contributor Author

Bilge commented Feb 14, 2020

@kevinburkemeter I don't know why you disabled issues on your repository, but I thought it was supposed to be a drop-in replacement. My command, which has worked for years until this day, does not work on your fork.

./linux-amd64-github-release upload --user 250 --repo Steam-250 --tag snapshots --name snapshots.tar.xz --file tar --replace --security-token '***'

./linux-amd64-github-release: Permission denied
##[error]Bash exited with code '126'.

Looking forward to trying @gdm85's fork instead.

@kevinburke1
Copy link
Contributor

kevinburke1 commented Feb 14, 2020

Yes, the goal was to make it a drop in replacement. Considering you're getting something for free, and I have no obligation to help anyone in this situation, I'm a little frustrated with the tone you're taking.

I didn't touch the Makefile at all, so I'm not sure why it's broken. The file you are trying to run needs to be executable though, which is why you are getting "Permission denied," it has nothing to do with the code changes. Try running chmod +x linux-amd64-github-release and rerunning the command.

@kevinburke1
Copy link
Contributor

I suspect it has to do with b61ce1a which was added after 0.7.2 was released. So, drop in replacement for the untagged master version of the github-release project.

Anyway, I'll push a fix later today.

@ocdtrekkie
Copy link

I may be inclined to just look at the script we have this in, and see if it's easy enough to replace it with hub rather than chasing down forks of a third party tool to begin with. It looks like gh from GitHub doesn't yet have release functionality, but hub does.

@gdm85
Copy link

gdm85 commented Feb 14, 2020

The best would be to use GitHub official CLI, there is no doubt.

Until that I have updated my fork at https://github.com/gdm85/github-release and tagged v0.8.0 for the working version that adds support for --auth-user/GITHUB_AUTH_USER and uses the Authorization header (cc @Bilge).

NOTE 1: please do some thorough testing before putting this into your important workflows; I have tested only the following:

  • info
  • release
  • upload
  • delete

And assumed that the rest are working correctly as well.

NOTE 2: do not use go get to install it: I am waiting for feedback on this PR to solve that issue (if you use go get then the built version will not accept --user, --auth-user, --repo and you can only use environment variables for them).

@kevinburke1
Copy link
Contributor

@Bilge I just confirmed that the issue you ran into was introduced in the last commit on the original project, in 2017, so it's been there for three years. The reason you haven't seen it before is that commit never made it into a release version.

In any event, I just pushed a fix to meterup/github-release@c3c29b7, which is present in v0.7.5.

@amotl
Copy link

amotl commented Apr 22, 2020

Dear @kevinburkemeter,

thanks for picking up the work on github-release. We have been getting respective notification mails from GitHub and hoped someone would have made the appropriate patches to this program already.

We are happy to see it has been you. Updating the documentation was easy (hiveeyes/terkin-datalogger@8c58bd8).

So, thanks to @aktau for conceiving this fine program and to you for bringing in important maintenance patches.

With kind regards,
Andreas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants