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

[v2]: Not require GIT_USER when using ssh #3454

Closed
isy opened this issue Sep 15, 2020 · 1 comment · Fixed by #5840
Closed

[v2]: Not require GIT_USER when using ssh #3454

isy opened this issue Sep 15, 2020 · 1 comment · Fixed by #5840
Labels
proposal This issue is a proposal, usually non-trivial change

Comments

@isy
Copy link

isy commented Sep 15, 2020

💥 Proposal

GIT_USER environment variable is required for deploying, but in case of SSH, I think there is no problem without GIT_USER.

If USE_SSH is true, I'd like to fix it so that GIT_USER is not needed. Is there any problem with this?

const gitUser = process.env.GIT_USER;
if (!gitUser) {
throw new Error('Please set the GIT_USER environment variable!');
}

const useSSH = process.env.USE_SSH;
const remoteBranch =
useSSH && useSSH.toLowerCase() === 'true'
? `git@${githubHost}:${organizationName}/${projectName}.git`
: `https://${gitUser}@${githubHost}/${organizationName}/${projectName}.git`;

Have you read the Contributing Guidelines on issues?

👍

@isy isy added status: needs triage This issue has not been triaged by maintainers proposal This issue is a proposal, usually non-trivial change labels Sep 15, 2020
@slorber
Copy link
Collaborator

slorber commented Sep 29, 2020

Hi,

I'm not using GH pages. Have you tested these changes locally and it works fine without GIT_USER and with USE_SSH?

Any help to setup and document carefully the GH deployment workflow is welcome, it's very likely we can improve those.

@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue is a proposal, usually non-trivial change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants