steelbrain / steelbrain/node-ssh
Run a git clone that requires a username and password?
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Code
const SSH = require('node-ssh')
const ssh = new SSH()
async function test () {
await ssh.connect({
host: 'myIP',
username: 'root',
port: 22,
password: 'MyPassword',
tryKeyboard: true,
onKeyboardInteractive: (name, instructions, instructionsLang, prompts, finish) => {
console.log(name)
console.log(instructions)
console.log(instructionsLang)
console.log(prompts)
console.log(finish)
}
})
let res = await ssh.execCommand('git clone https://gitee.com/dtboy/platform.git')
console.log(res);
// ssh.requestShell
console.log('#')
// ssh.dispose()
}
test()
- This function,
onKeyboardInteractive, is never called - res
{ code: 128,
signal: undefined,
stdout: 'Cloning into \'platform\'...',
stderr:
'fatal: could not read Username for \'https://gitee.com\': No such device or address' }
What should I do, any help would be appreciated!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ssh.execCommand('git clone ...') call and compare it with the onKeyboardInteractive callback configured on ssh.connect. Check how command execution handles input and authentication, then reproduce the reported Username error. Done means documenting or implementing a supported way for the clone to authenticate successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100