gavinr / github-csv-tools

Import and export GitHub issues via CSV
https://npmjs.com/github-csv-tools
MIT License
657 stars 116 forks source link

tool adds /repos/* to url? #34

Closed andre-fxcm closed 2 years ago

andre-fxcm commented 3 years ago

Hi, I have an enterprise url im trying to get issues from, but the tool adds /repos to my url, and it does not resolve in my enterprise github. how can i remove this added /repos ?

 url: 'https://github.internal/repos/Dev/foo/issues?state=all',
gavinr commented 3 years ago

Where are you seeing that? When you're exporting or importing?

andre-fxcm commented 3 years ago

I'm exporting from an internal enterprise github

-t repo -g https://github.internal -o Dev -r Foobar -e -v

andre-fxcm commented 3 years ago

error { HttpError: request to https://github.internal/repos/Dev/Foobar/issues?state=all failed, reason: unable to verify the first certificate at fetch.then.then.catch.error (D:\opt\node-v8.17.0-win-x64\node_modules\github-csv-tools\node_modules\@octokit\request\dist-node\index.js:107:11) at at process._tickCallback (internal/process/next_tick.js:189:7) name: 'HttpError', status: 500, headers: {}, request: { method: 'GET', url: 'https://github.internal/repos/Dev/Foobar/issues?state=all', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'github-csv-tools octokit-rest.js/17.11.2 octokit-core.js/2.5.4 Node.js/8.17.0 (Windows 10; x64)', authorization: 'token [REDACTED]' }, request: { hook: [Function: bound bound register] } } }

andre-fxcm commented 3 years ago

this path doesnt resolve in my enterprise install https://github.internal/repos/Dev/Foobar/issues?state=all I don't know why it has /repos/ added, this is correct url https://github.internal/Dev/Foobar/issues?state=all

andre-fxcm commented 3 years ago

there might be some other problem with my ssh too, still trying to figure it out! thanks for your help :)

gavinr commented 3 years ago

failed, reason: unable to verify the first certificate

Based on that, I think there might be an issue with your SSL certificate. Try this: https://stackoverflow.com/questions/33820733/error-unable-to-verify-the-first-certificate-how-to-trust-all-certificates

joeomc commented 3 years ago

The -g needs to be passed the url to the api for on prem enterprise. -g https://github.internal/api/v3

binaryn3xus commented 3 years ago

The solution that @joeomc posted worked for me when I had this issue today. Hope this helps the next person that comes along with this problem.

rmccaskill commented 2 years ago

The -g needs to be passed the url to the api for on prem enterprise. -g https://github.internal/api/v3

I ran into this tonight! Thank you for this response and for @JoshuaGarrison27 for confirming. It did indeed work for me! I submitted a pull request to make it more clear that the API path and the end isn't optional!

Thank you both!

gavinr commented 2 years ago

A reminder that /api/v3 needs to be included in the enterprise url was added to the README doc in #52 and #64.