Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codenvy git push command

Tags:

git

codenvy

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?

like image 985
Tyvain Avatar asked May 06 '26 05:05

Tyvain


2 Answers

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

like image 142
chaoluo Avatar answered May 09 '26 03:05

chaoluo


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.

like image 22
VonC Avatar answered May 09 '26 02:05

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!