My test set-up:
const PUBLIC_KEY = fs.readFileSync(`${os.homedir()}/.ssh/id_rsa.pub`, 'utf-8');
const PRIVATE_KEY = fs.readFileSync(`${os.homedir()}/.ssh/id_rsa`, 'utf-8');
/**
* @param {string} environmentName
* @param {Git.Remote} remote
*
* @return {PromiseLike<Number> | Promise<Number>}
*/
const deployToEnvironment = (environmentName, remote) => Git.Cred.sshKeyMemoryNew(USERNAME, PUBLIC_KEY, PRIVATE_KEY, '').then((cred) => {
return remote.push(
[`refs/heads/${environmentName}:refs/heads/platformsh/${environmentName}`],
{
callbacks: {
certificateCheck: () => 0,
credentials: (url, userName) => {
console.log(`getting creds for url:${url} username:${userName}`);
return cred;
},
transferProgress: (progress) => {
console.log('progess: ', progress); // <- never executed
}
}
},
console.log // <- never executed
).catch(console.log).then(console.log); // <- never executed
});
This gives me the following output:
getting creds for url:THE_URL username:THE_USERNAME
However, neither the .catch, nor the .then is called. The push itself does not start.
My test set-up:
This gives me the following output:
getting creds for url:THE_URL username:THE_USERNAMEHowever, neither the .catch, nor the .then is called. The push itself does not start.