I am trying to use set-account command to change a user's email address. This is what I did:
ssh -p 29418 root#mygerritserver.com gerrit set-accont --add-email "user1#user.com" user1
and I got this error:
gerrit: set-accont: not found
I am sure I typed correct url, port, username, etc.. What did I do wrong?
You have a typo, set-account, not set-accont
Reference to https://git.eclipse.org/r/Documentation/cmd-set-account.html
Related
Hi everyone I've been trying to use mosquitto dynamic security plugin, the broker is running in a docker container, and so far everything seems to work as expected I can generate de file dynamic-secutiry.json for that I used the following command mosquitto_ctrl dynsec init path/to/dynamic-security.json user and after that, I set the password as user, so managed to open the file and make sure that it was created right, and indeed it was. However, when I try to modify the file like adding a new client for instance I got the following message Connection error: Not authorized in order to add new clients I've been something like this mosquitto_ctrl -u user -P user dynsec createRole rolepizza and then I'm getting this:
That's the dynamic-security.json
Finally my mosquitto.conf
I've been following this tutorials:
https://www.youtube.com/watch?v=QvRBtRH2mN0
http://www.steves-internet-guide.com/understanding-mosquitto-dynamic-security-plugin/
I'd appreciate it if someone could tell me what I've been doing wrong. Thanks in advance
As hashed out in the comments, the problem was most likely a lack of write permissions on dynamic-security.json file due to creating it as root.
Mosquitto will normally drop root permissions on startup, so all config/log files should be writable by a none privileged user (you can set the user in the mosquitto.conf file.
I am trying to use redirection to load a SQL database schema using:
system("mysql -p -h db.server.local -u admin -D some_db < schema.sql")
I expect it to prompt for a password, and it works correctly when run from IRB. However, when run via Rails' runner it fails
as if I had hit the Enter key at the password prompt. In Rails console it looks like this:
pry(main)> system("mysql -p -h db.server.local -u admin -D some_db < schema.sql")
Enter password: ERROR 1045 (28000): Access denied for user 'admin'#'mylocalpc' (using password: NO)
It did not give me a chance to enter the password. When I removed the redirection (<), it correctly prompts for a password. So it appears that somehow, when run via Rails, the STDIN redirection is disrupting the password prompt. I tried with backticks and had the same issue.
I assume that the mysql executable must be using some magic so that the STDIN redirection does not disrupt the password prompt, but it appears to be broken when the executable is launched via Rails.
Is Rails overriding System() and if so, is there some way to call the real System()?
Does anyone have other ideas of how to work around this, or what could be happening here?
The mysql executable is skipping the request for a password because in order to except stdin for the password, the command needs to be executed with TTY enabled. Ruby system command and backticks do not execute the command using a TTY enabled interface to the underlying system. There are a couple gems that allow for TTY enabled execution on the command line, I would check out the tty-command gem if you’d like to force the command prompt to ask for the password.
Though for the ideal solution that I would suggest, since you’re executing the command from within Rails, you should have access to Rails.credentials. I would store the necessary credentials (username and password) for the database within the credentials store, and use this to populate the -u and -P flag values for the mysql command. This will avoid the need to prompt for the password entirely.
I was trying to login to a docker lab host using Putty but not able to login. The error is :-
'no authentication method available server sent public key'.
If I pass both username#server name i get error.
If I only pass the server name i get to the login screen but then when i enter my username the error pops up
I tried searching the web but couldn't find.
Please can anyone help me.
You can refer to the article "PWD + SSH = ❤" (with "PWD" = "Play With Docker").
The full command should be:
ssh -p 1022 <instance_ip_with_dashes>-<short_session_id>#pwdhost
But that requires on the client side to have in $HOME/.ssh
id_rsa: the private key
id_rsa.pub: the public key registered in <instance_ip_with_dashes>-<short_session_id> home.
Since copying a private key is not a good practice, you can do the opposite (in a Git bash session, not using putty):
ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
Copy the public generated key to ~<instance_ip_with_dashes>-<short_session_id>/.ssh/authorized_keys
Then your SSH session will be possible.
Note: All that is managed for you if you are using the docker-machine pwd driver, as shown in the article above:
As you can see, in that case, a docker-machine ssh is enough.
http://github.com/play-with-docker/play-with-docker/issues/285
Actually I had to create or generate keys on the client. In order to start the communication between the client and the server.But I was copying the private key of the server silly me.
Key generation can be done in 2 ways
1. If you are using git run ssh-keygen
2. If you want to login using putty the first generate keys using puttygen and then attached the private key .ppk while ssh.
Tired of typing in login and password. So the registry is the same, but accounts are different. Should I just make a script that replaces ~/.docker/config.json?
Unfortunately, no. The config.json can only hold one credentials value for each remote registry. Moreover, there is an open issue to handle multiple logins to dockerhub.
However, you can easily solve the problem using bash aliases. Edit your ~/.bashrc file and add the following lines:
alias dl1='docker login -u <user1> -p <password1>'
alias dl2='docker login -u <user2> -p <password2>'
Now you can do dl1 to login to account1 and dl2 to switch to account2
You can basically also do something similar if you are on MAC or Windows.
Having trouble finding information on using Jenkins SSHD, there's a RSA key (publickey?) supplied by the X-Instance-Identity header when browsing the top page.
Trouble is, it's not clear how to use this.
I've tried the obvious, and added it to ~/.ssh/id_rsa_jenkins and then attempted to connect, after first setting the SSHD port in Jenkins config to 8822
ssh -i ~/.ssh/id_rsa_jenkins -p 8822 jenkins_server
(and alternatively)
ssh -i ~/.ssh/id_rsa_jenkins -p 8822 user#jenkins_server
However, with both of these connection attempts, I'm challenged for a passphrase, which I don't have (attempting to use the user login fails.)
Does anyone have any ideas?
Managed to figure this out, from the Jenkins top page (when logged in)
> People > User > Configure
Then find SSH Public keys, paste the rsa/dsa public key in here and save, and you can log in.