My 'Codenvy git config' is ok (can push through menu: git > remote > push).
Now I would like to configure a 'push' through command.
I tried a simple 'git push' but it asks for login / password.
Managed to do it with :
git push https://login:[email protected]
But having clear password in the command line is not a good idea.
How can I do this command in codenvy with my ssh key?
Change the remote repo URI to ssh in .git/config, or you change use git command.
git remote set-url origin sshAddress
detail see here
It depends if your remote repo (accessed from your CodeEnvy cloud session) supports registering a public ssh key.
You would need first to generate an ssh private/public key pair in your CodeEnvy account (in ~/.ssh)
The, as describe in this CodeEnvy forum thread (speaking about a remote AWS repo), you would need to register your public key.
Only then, an ssh url would not ask for a username/password (which is the ssh fallback mechanism when it does not find the public key)
For http, you might need to try a credential helper, if CodeEnvy supports one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With