Skip to content

Fix error git clone failed with error code 128 - Windows #541

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/pip.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ function installRequirements(targetFolder, serverless, options) {
'-e',
'SSH_AUTH_SOCK=/tmp/ssh_sock'
);
chmod_cmd = ['chmod', '600', '/root/.ssh/id_rsa'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to only run this command for Windows environments?
If possible, we should try to avoid modifying the permissions of user's files (since the SSH private key is mounted from the user directly).

Also, please keep in mind that there may be other, non-RSA private keys.

pipCmds.unshift(chmod_cmd);
}

// If we want a download cache...
Expand Down