octokit / rest.js

GitHub REST API client for JavaScript
https://octokit.github.io/rest.js
MIT License
525 stars 62 forks source link

[SUPPORT] Proxy issue #417

Closed ktomaszx closed 3 months ago

ktomaszx commented 3 months ago

Hi, could please help me with setting up proxy. I tried a few approaches but they don't work in my case. I should point out that I have no experience with typescript nor js. I'm reusing open source project that need to adapt to work with proxy. What I do is running simple request to github repo. Curl with HTTPS_PROXY works fine but octokit return 500. const octokit = new Octokit({auth: 'token ${githubToken}' const commit = await octokit.repos.getCommit(params)

I already tried using HttpsProxyAgent plugin, undiciFetch or directly add proxy like const octokit = new Octokit({auth: 'token ${githubToken}', agent: new HttpsProxyAgent("<proxy>")}) but nothing seems to work. @gr2m I saw that you were involved in all reported proxy issues. Could you please advice me? Thanks in advance.

github-actions[bot] commented 3 months ago

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

wolfy1339 commented 3 months ago

Please read up on https://github.com/octokit/octokit.js/blob/main/README.md#proxy-servers-nodejs-only

The agent option does not exist anymore

ktomaszx commented 3 months ago

actually I tried it before and it didn't work but turned out that the issue was different anyway thanks a lot!