Open swaprenge opened 2 years ago
Hello @swaprenge
Thanks for trying out Ship.js. Do you have GITHUB_TOKEN
environment variable in .env
file? I do not have experience with GH Enterprise account. It'd be much helpful if you could provide screenshots or error messages if any.
Or, you could have a cron job in the GitHub Action to run yarn run release
periodically (like every week). Then I guess GH Action will take care of the authentication process as well. But you may want to run yarn run release
manually. So I'd appreciate if you could provide more information. Thanks!
Hi @eunjae-lee Thanks for your reply. I have setup GITHUB_TOKEN
in .env
file (Checking the Github token step is successful) and I am attaching the screenshot of the error I am getting.
Let me know if you need any other details. Thanks.
From the above image, You will get that, I have been asked to do the SignIn using the Github, but it should ask for Github enterprise SignIn, as my repository is in the Enterprise account. I am not sure how can i SignIn using the Enterprise account.
Hi @swaprenge, first of all, I have no experience with GH enterprise, so I've never seen that sign-in page. So I may be wrong on what I'm talking about.
On your first screenshot I see
fatal: repository 'https://github.com/FactSet/pw-systemtools-config-dashboard/' not found
I assume.. the domain is not github.com but something of your company's, right? Do you think if it tries to push to the correct origin, you'll see the correct sign-in page?
If that's the cause, I think these three lines should change:
There can be a config for that like
// ship.config.js
module.exports = {
githubHost: 'my-own-gh-enterprise.com'
};
What do you think? Would you be interested in contributing?
If that's the cause, I think these three lines should change:
- https://github.com/algolia/shipjs/blob/62267a1da0b7e3fd946f45a439df5fc58a85c4c1/packages/shipjs-lib/src/lib/git/getRepoInfo.js#L7:L7
- https://github.com/algolia/shipjs/blob/62267a1da0b7e3fd946f45a439df5fc58a85c4c1/packages/shipjs-lib/src/lib/git/getRepoURLWithToken.js#L7:L7
- https://github.com/algolia/shipjs/blob/62267a1da0b7e3fd946f45a439df5fc58a85c4c1/packages/shipjs-lib/src/lib/git/getRepoURLWithTokenMasked.js#L7:L7
There can be a config for that like
// ship.config.js module.exports = { githubHost: 'my-own-gh-enterprise.com' };
What do you think? Would you be interested in contributing?
@eunjae-lee I think these suggested changes will be required to support the enterprise host. And yeah, I would love to contribute. I Will raise a PR by making the changes.
Thanks.
Hi @swaprenge, first of all, I have no experience with GH enterprise, so I've never seen that sign-in page. So I may be wrong on what I'm talking about.
On your first screenshot I see
fatal: repository 'https://github.com/FactSet/pw-systemtools-config-dashboard/' not found
I assume.. the domain is not github.com but something of your company's, right? Do you think if it tries to push to the correct origin, you'll see the correct sign-in page?
Yeah, If we push to the correct origin (i,e GitHub enterprise in my case) then we might see the correct sign-in page.
Thanks for the contribution @swaprenge :) I'll wait for your PR then.
@eunjae-lee apologies for the late, I was trying to make the above changes, but not sure about how to access githubHost
defined in ship.config.js
in files to replace hard-coded github.com
Can you please help me to do these changes?
Thanks.
I think I got it, We need to use the loadConfig
function to get config values, Will try to use it and will update,
@eunjae-lee I am trying to push the PR, but getting permission denied.
PS: I ran yarn contributors:add
command as well.
Not able to authenticate using Github Enterprise version A clear and concise description of what the bug is. I setup shipjs and configured github token in my Github Enterprise account. While running the
yarn run release
after running some checks, one of the step is Authentication, which opens github sign in page. But my repository is under the github enterprise version. How can I authenticate using Github enterprise version?To Reproduce Steps to reproduce the behavior:
yarn run release
Expected behavior Authentication should be successful and should be able to create release branch under the Github enterprise repository.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
node -v
: v.12.18.1npm -v
oryarn -v
: yarn v3.2.0Additional context NA