hgrc configuration for maven-release-plugin - mercurial

I'm creating a new custom maven archetype for android... it's installed and working.
But where I try use mvn release:perform, I get the following error:
[DEBUG] pushing to http://code.programadoremjava.com.br/android-archetype
[DEBUG] searching for changes
[DEBUG] ignoring invalid [auth] key 'username'
[DEBUG] ignoring invalid [auth] key 'password'
[DEBUG] abort: http authorization required for http://code.programadoremjava.com.br/android-archetype
The project hgrc is here:
[paths]
default = http://code.programadoremjava.com.br/android-archetype
[auth]
username=MyUser
password=MyPass
What are wrong/missing?

Try this:
[paths]
default = http://code.programadoremjava.com.br/android-archetype
[auth]
repo.prefix = http://code.programadoremjava.com.br/android-archetype
repo.username = MyUser
repo.password = MyPass
Much more details you can find here: How to save username and password with Mercurial?

Related

How to know where ejabberd is config

I am working on old project where ejabberd is used. In laravel env file this information is written
JABBER_SERVER=localhost
JABBER_ENV=dev
RPC_SERVER= http://xx.xx.xx.xxx:4560/RPC2
JABBER_HOST=localhost
when i try to find the ejabberd service on my ubuntu server i couldn't.I don't have any idea how i can find ejabberd information because i am getting an error.
2019-12-26 07:54:27.338 [info] <0.23787.5>#ejabberd_c2s:process_terminated:264 (tcp|<0.23786.5>) Closing c2s session for prod6067#localhost/121590970668513998469410: Connection failed: connection closed
2019-12-26 07:54:30.577 [info] <0.339.0>#ejabberd_listener:accept:300 (<0.23789.5>) Accepted connection 115.186.58.62:58101 -> 172.31.42.93:5222
2019-12-26 07:54:31.390 [info] <0.23790.5>#ejabberd_c2s:handle_auth_success:423 (tcp|<0.23789.5>) Accepted c2s SCRAM-SHA-1 authentication for prod6067#localhost by mnesia backend from
2019-12-26 07:54:32.166 [info] <0.23790.5>#ejabberd_c2s:bind:394 (tcp|<0.23789.5>) Opened c2s session for prod6067#localhost/151108589900049164879426
If you can run the ejabberdctl shell script, then it will show many information about where ejabberd is installed:
$ ejabberdctl
...
Optional parameters when starting an ejabberd node:
--config-dir dir Config ejabberd: /etc/ejabberd
--config file Config ejabberd: /etc/ejabberd/ejabberd.yml
--ctl-config file Config ejabberdctl: /etc/ejabberd/ejabberdctl.cfg
--logs dir Directory for logs: /usr/local/var/log/ejabberd
--spool dir Database spool dir: /usr/local/var/lib/ejabberd
--node nodename ejabberd node name: ejabberd#localhost

Tortoise HG mercurial 502 BadGateway

few days ago we have started to see this error when we tried to hg push.
when running hg push --debug --traceback -v ive got this output:
pushing to https://<server>/repository
using https://<server>/repository
sending capabilities command
using auth.mrsdev.* for authentication
<server> certificate matched fingerprint <fingerprint>
using auth.mrsdev.* for authentication
http auth: user trannann, password ***********
using auth.mrsdev.* for authentication
<server> certificate matched fingerprint <fingerprint>
query 1; heads
sending batch command
using auth.mrsdev.* for authentication
searching for changes
all remote heads known locally
preparing listkeys for "phases"
sending listkeys command
using auth.mrsdev.* for authentication
received listkey for "phases": 15 bytes
checking for updated bookmarks
preparing listkeys for "bookmarks"
sending listkeys command
using auth.mrsdev.* for authentication
received listkey for "bookmarks": 0 bytes
sending branchmap command
using auth.mrsdev.* for authentication
<server> certificate matched fingerprint <fingerprint>
sending branchmap command
using auth.mrsdev.* for authentication
preparing listkeys for "bookmarks"
sending listkeys command
using auth.mrsdev.* for authentication
received listkey for "bookmarks": 0 bytes
8 changesets found
list of changesets:
e34d64fb754056d112d2da58cf0675e6c9e02842
8aab72238ada787283715b6bfc0415d7fbae3709
e3583d6b2fb359db2cfb430cde7b55f38992c640
ec49b6a57c2ed999d752a4a6556bf64304bbd36f
06cef21425beb141e9f168d968124e91e8b0d364
fde87053c99bdaa171df76e7d51203e4f166c65e
59702ada4e4fba01fd166747eb043032771f7da6
3e4f6b3323d2724c2b1af6820121bcaa0c081d24
sending unbundle command
sending 21543 bytes
using auth.mrsdev.* for authentication
<server> certificate matched fingerprint <fingerprint>
**HTTP Error: 502 (Bad Gateway)**
[command returned code 255 Wed May 03 14:53:55 2017]
Questions:
1) what is happening?
2) where can I find error logs on server? Googled a while but can not find the location of logs or where is the path set.

enable authentication in mqtt username and password

changes in mqtt configuration file for authentication with username and password conf file settinguse_identity_as_username true
username:password
password_file
what changes we need to do in configuration file
I am using Mosquitto MQTT broker and I do like this:
Set allow_anonymous false
password_file file_path
Then try starting broker with conf file::::
From command prompt:
c:\>mosquitto\mosquitto -c mosquitto.conf
//

Problem with Jenkins accessing Mercurial repository on bitbucket.org

My Jenkins server has stopped being able to build a maven project hosted at bitbucket.org. The build works locally but Jenkins reports this error:
[workspace] $ hg incoming --quiet --bundle hg.bundle --template "<changeset node='{node}' author='{author|xmlescape}' rev='{rev}' date='{date}'><msg>{desc|xmlescape}</msg><added>{file_adds|stringify|xmlescape}</added><deleted>{file_dels|stringify|xmlescape}</deleted><files>{files|stringify|xmlescape}</files><parents>{parents}</parents></changeset>\n" --rev default
abort: no suitable response from remote hg!
ERROR: Failed to determine incoming changes
[workspace] $ hg log --rev . --template {node}
Any ideas what's going on?
[edit]
So, I ran hg paths and got a response that the tomcat user was untrusted:
Not trusting file /usr/local/tomcat/.jenkins/jobs/Test/workspace/.hg/hgrc from untrusted user tomcat, group tomcat
After running hg incoming as the tomcat user
cd /usr/local/tomcat/.jenkins/jobs/Test/workspace
sudo -u tomcat hg incoming
I got an error saying the permissions on my ssh key were too open:
remote: ###########################################################
remote: # WARNING: UNPROTECTED PRIVATE KEY FILE! #
remote: ###########################################################
remote: Permissions 0620 for '/usr/local/tomcat/.ssh/id_rsa' are too open.
remote: It is recommended that your private key files are NOT accessible by others.
remote: This private key will be ignored.
remote: bad permissions: ignore key: /usr/local/tomcat/.ssh/id_rsa
remote: Permission denied (publickey).
abort: no suitable response from remote hg!
and thanks to this SO question
I set the permissions and now Jenkins can successfully build.
Since your hg incoming is based on whatever your 'default' path is in the repository's hgrc (use hg paths to see them, or open the file), maybe you should make sure the address of the remote repository is still correct and that the project is still accessible.

Mercurial on windows and ssh configuration with Copssh problem

I've installed the copssh on a windows 2008 server and then I tried to clone a reposity on the server through ssh. But no matter how hard I tried I couldn't fix this error i got. here is the log:
C:\Users\Admin>hg clone ssh://ehsan#rafsanjani.ir
The authenticity of host 'rafsanjani.ir (96.31.90.174)' can't be established.
RSA key fingerprint is 41:a8:41:21:61:1a:67:2c:e8:44:99:6c:63:e7:06:73.
Are you sure you want to continue connecting (yes/no)? yes
ehsan#rafsanjani.ir's password:
remote: Could not create directory '/home/Administrator/.ssh'.
remote: Failed to add the host to the list of known hosts (/home/Administrator/.ssh/known_hosts).
remote: /bin/bash: Permission denied
abort: no suitable response from remote hg!
I tried to login with administrator but i get the same error message. Also i changed the permission of the folder located in C:\Program Files (x86)\ICW\home\administrator so that ehsan has the full access to this folder.
also when I connect to the server with putty and use this command:
cd /home/administrator/.ssh
echo test>test
file test will create! so it seems that I have the permission to this folder!
this is log when i try to clone with administrator account:
C:\Users\Admin>hg clone ssh://administrator#rafsanjani.ir
The authenticity of host 'rafsanjani.ir (96.31.90.174)' can't be established.
RSA key fingerprint is 41:a8:41:21:61:1a:67:2c:e8:44:99:6c:63:e7:06:73.
Are you sure you want to continue connecting (yes/no)? yes
administrator#rafsanjani.ir's password:
remote: Could not create directory '/home/Administrator/.ssh'.
remote: Failed to add the host to the list of known hosts (/home/Administrator/.ssh/known_hosts).
remote: bash: hg: command not found
abort: no suitable response from remote hg!
The latest versions of copssh/cwrsync use cygwin 1.7 and require a HOME environment variable. So just add a HOME=%HOMEDRIVE%%HOMEPATH% variable and it should work right away. It did for me :)