bmpi-dev / code.bmpi.dev

VSCode Server in Cloud for BMPI
https://www.bmpi.dev/dev/vscode-on-cloud/
9 stars 2 forks source link

Error when pulumi up #1

Open MichaelPan1026 opened 3 years ago

MichaelPan1026 commented 3 years ago

When I pulumi up, it’ll throw this error:

error: Running program '/home/admin/vscode/code.bmpi.dev/server' failed with an unhandled exception:
    Error: ENOENT: no such file or directory, open '/home/admin/.ssh/id_rsa.pub'
        at Object.openSync (fs.js:462:3)
        at Object.readFileSync (fs.js:364:35)
        at Object.<anonymous> (/home/admin/vscode/code.bmpi.dev/server/index.ts:10:16)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Module.m._compile (/home/admin/vscode/code.bmpi.dev/server/node_modules/ts-node/src/index.ts:439:23)
        at Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Object.require.extensions.<computed> [as .ts] (/home/admin/vscode/code.bmpi.dev/server/node_modules/ts-node/src/index.ts:442:12)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
        at Module.require (internal/modules/cjs/loader.js:887:19)

I need help! Thanks!

madawei2699 commented 3 years ago

It needs to have a default ssh key pair in local env.

MichaelPan1026 commented 3 years ago

What’s the ENV name?

Dawei Ma @.***>於 2021年9月9日 週四,04:47寫道:

It needs to have a default ssh key pair in local env.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bmpi-dev/code.bmpi.dev/issues/1#issuecomment-915558928, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIGQUKKYSFAYYCIAAVWNXLUA7DXLANCNFSM5DVUWSSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

madawei2699 commented 3 years ago

You must creat SSH key pair and move it to ~/.ssh/ in your computer. See this doc: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

MichaelPan1026 commented 3 years ago

You must creat SSH key pair and move it to ~/.ssh/ in your computer. See this doc: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

Got it. But I'd tried to create SSH key pair before. And it kept throwing this:

    error: Running program '/home/admin/vscode/code.bmpi.dev/server' failed with an unhandled exception:
    Error: invocation of aws:ec2/getAmi:getAmi returned an error: invoking aws:ec2/getAmi:getAmi: 1 error occurred:
        * Your query returned no results. Please change your search criteria and try again.

        at Object.callback (/home/admin/vscode/code.bmpi.dev/server/node_modules/@pulumi/pulumi/runtime/invoke.js:140:33)
        at Object.onReceiveStatus (/home/admin/vscode/code.bmpi.dev/server/node_modules/@grpc/grpc-js/src/client.ts:338:26)
        at Object.onReceiveStatus (/home/admin/vscode/code.bmpi.dev/server/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
        at Object.onReceiveStatus (/home/admin/vscode/code.bmpi.dev/server/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
        at /home/admin/vscode/code.bmpi.dev/server/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
        at processTicksAndRejections (internal/process/task_queues.js:79:11)

AWS Access Key ID and AWS Secret Key are correct.

madawei2699 commented 3 years ago

It seems like your aws account cannot get AMI, you can search ami-0cb5f8e033cfa84d2 in your aws web console(ec2), then post screenshot in here.