OpenProject Incoming mail issues - redmine

I'm trying to create new issues from incoming mail. The problem is that it works with users who have an account, but it does not create work packages from users not in the system. Here is the command:
openproject run bundle exec rake redmine:email:receive_imap host='outlook.office365.com' username='Redacted' password='Redacted' port=993 ssl=true allow_override=type,project project=pending unknown_user=accept no_permission_check=1
I thought that unknown_user=accept and no_permission would do the trick but no such luck. I'm also seeing this in the log:
ERROR -- : Message 27 resulted in error Message was not successfully handled. Message was not successfully handled.

You should navigate to settings -> Authentication then on self-registration dropdown make it Automatic account creation and repeat your tests.

Title email require It's enough unknown_user=accept no_permission_check=1

Related

"Mailgun Magnificent API" error with Django-Anymail in docker on Digital Ocean

I am running a django application running on docker
and I am using django-anymail to send emails via mailgun.
When I go through for example a forgot my password process I am getting an error in django-anymail:
AnymailRequestsAPIError: Invalid JSON in Mailgun API response
Sending a message to testemail#test.com from info#application.co.uk
Mailgun API response 200 (OK): 'Mailgun Magnificent API'
# anymail/backends/base_requests.py in deserialize_json_response at line 106
I am able to re-create this error if I docker exec -it onto the django container and run the following in a python manage.py shell
from django.core.mail import send_mail
customer_email = send_mail('Test','Test','info#*application*.co.uk',["*test#test.com*"],fail_silently=False)
If I run this after building and running my production.yml docker locally it works and I get an email but if I run this on the container on my digital ocean droplet I receive an error.
Is there a configuration I am missing in order to get this working? I have another django application just running on a droplet(no docker) and it works fine with mailgun using the same setup.
The error "Mailgun Magnificent API" is most likely caused by a # character in your MAILGUN_SENDER_DOMAIN. That often happens when you try to use line-end comments in a config file format that doesn't support them—like dotenv:
# .env
MAILGUN_SENDER_DOMAIN=mail.example.com # INVALID: dotenv doesn't allow comment here
If you upgrade to django-anymail v6.0, you'll get an improved error message that makes this more obvious.
(This answer covers other situations that can lead to "Mailgun Magnificent API.")

Redmine 3.3.2, Redmine git hosting plugin

I am trying to install the redmine Git Hosting plugin for redmine 3.3.2.
I have followed the steps at (http://redmine-git-hosting.io/get_started/) but when i try the 9th step, which is to login to the git, I get asked for a password. There is no password on the GIT user, and just entering a blank password also doesn't work...
I can confirm that there's no password on the user:
[root#RedmineZonderDocker2 ~]# passwd -S git
git NP 2018-12-16 0 99999 7 -1 (Empty password.)
The log of the plugin does state this:
2018-12-16 20:16:47 +0000 [INFO] Testing if Redmine user 'redmine' can sudo to Gitolite user 'git'...
2018-12-16 20:16:47 +0000 [INFO] OK!
2018-12-16 20:16:47 +0000 [ERROR] Error while getting Gitolite infos, check
your SSH keys (path, permissions) or your Git user.
I clearly have no idea where the problem lays, and as you might notice, i'm quite new to all this. Any help would be appreciated.
If you need other config files or logs, please let me know and i'll gladly provide them.
Kind regards
Make sure you have completed all the settings described in step 9 and restarting Redmine after changing said settings, as some of them are put in cache.
The password is only asked if the SSH key is not found or not properly register. In both instances, double-check "Gitolite - ssh troubleshooting and tips".
I found the problem, and the plugin is functional now.

Redmine: Issue to mail with Windows

I need to activate the option:create issue via mail, but I don't know how to do it.
I read the documentation but I don't understand it. I use bitnami to work with redmine on Windows platform.
Update:
I think i more closer now but when i run:
C:\Bitnami\redmine-3.2.3-0\apps\redmine\htdocs>rake redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com port=993 ssl=true username=xxxxxxx#xxx.x password=xxxxx
it returns me.
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
I' d change imap.rb as I read on another post I also update ruby gems and nothing always the same error. I changed and now don't give any error.
And I set Gmail accept insecure programa
this issue was reported in the Redmine forum
http://www.redmine.org/boards/1/topics/33669.
It seems you need to create a configuration file at config/initializers/ with the following content.
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
Please also try to run the rake command using bundle exec.
Regards,
Jota

Registering to PyPi: basic auth failed

I can't figure out how to register my project. I can login in fine at https://testpypi.python.org/pypi but using the same credentials at my .pypirc doesn't work.
.pypirc
[distutils]
index-servers=
test
[test]
repository = https://testpypi.python.org/pypi
username = <username>
password = <password>
<username> and <password> are replaced with the credentials I use to login manually at testpypi.
Then I try to register my project:
python setup.py register -r test
Output
running register
running egg_info
writing websocket_server.egg-info/PKG-INFO
writing top-level names to websocket_server.egg-info/top_level.txt
writing dependency_links to websocket_server.egg-info/dependency_links.txt
reading manifest file 'websocket_server.egg-info/SOURCES.txt'
writing manifest file 'websocket_server.egg-info/SOURCES.txt'
running check
Registering myproject to https://testpypi.python.org/pypi
Server response (401): basic auth failed
Any idea what is going on? I looked everywhere but there seems to be very little information on how to troubleshoot such issues.
You need to complete the registration by clicking the link in your email.

xcodebuild running tests headless?

As we all know by now, the only way to run tests on iOS is by using the simulator. My problem is that we are running jenkins and the iOS builds are running on a slave (via SSH), as a result running xcodebuild can't start the simulator (as it runs headless). I've read somewhere that it should be possible to get this to work with SimLauncher (gem sim_launcher). But I can't find any info on how to set this up with xcodebuild. Any pointers are welcome.
Headless and xcodebuild do not mix well. Please consider this alternative:
You can configure the slave node to launch via jnlp (webstart). I use a bash script with the .command extension as a login item (System Preferences -> Users -> Login Items) with the following contents:
#!/bin/bash
slave_url="https://gardner.company.com/jenkins/jnlpJars/slave.jar"
max_attempts=40 # ten minutes
echo "Waiting to try again. curl returneed $rc"
curl -fO "${slave_url}" >>slave.log
rc=$?
if [ $rc -ne 0 -a $max_attempts -gt 0 ]; then
echo "Waiting to try again. curl returneed $rc"
sleep 5
curl -fO "${slave_url}" >>slave.log
rc=$?
if [ $rc -eq 0 ]; then
zip -T slave.jar
rc=$?
fi
let max_attempts-=1
fi
# Simulator
java -jar slave.jar -jnlpUrl https://gardner.company.com/jenkins/computer/buildmachine/slave-agent.jnlp -secret YOUR_SECRET_KEY
The build user is set to automatically login. You can see the arguments to the slave.jar app by executing:
gardner:~ buildmachine$ java -jar slave.jar --help
"--help" is not a valid option
java -jar slave.jar [options...]
-auth user:pass : If your Jenkins is security-enabled, specify
a valid user name and password.
-connectTo HOST:PORT : make a TCP connection to the given host and
port, then start communication.
-cp (-classpath) PATH : add the given classpath elements to the
system classloader.
-jar-cache DIR : Cache directory that stores jar files sent
from the master
-jnlpCredentials USER:PASSWORD : HTTP BASIC AUTH header to pass in for making
HTTP requests.
-jnlpUrl URL : instead of talking to the master via
stdin/stdout, emulate a JNLP client by
making a TCP connection to the master.
Connection parameters are obtained by
parsing the JNLP file.
-noReconnect : Doesn't try to reconnect when a communication
fail, and exit instead
-proxyCredentials USER:PASSWORD : HTTP BASIC AUTH header to pass in for making
HTTP authenticated proxy requests.
-secret HEX_SECRET : Slave connection secret to use instead of
-jnlpCredentials.
-slaveLog FILE : create local slave error log
-tcp FILE : instead of talking to the master via
stdin/stdout, listens to a random local
port, write that port number to the given
file, then wait for the master to connect to
that port.
-text : encode communication with the master with
base64. Useful for running slave over 8-bit
unsafe protocol like telnet
gardner:~ buildmachine$
For a discussion about OSX slaves and how the master is launched please see this Jenkins bug: https://issues.jenkins-ci.org/browse/JENKINS-21237
Erik - I ended up doing the items documented here:
Essentially:
The first problem, is that you do have to have the user that runs the builds also logged in to the console on that Mac build machine. It needs to be able to pop up the simulator, and will fail if you don’t have a user logged in — as it can’t do this entirely headless without a display.
Secondly, the XCode Developer tools requires elevated privileges in order to execute all of the tasks on the Unit tests. Sometimes you may miss seeing it, but without these, the Simulator will give you an authentication prompt that never clears.
A first solution to this (on Mavericks) is to run:
sudo security authorizationdb write system.privilege.taskport allow
This will eliminate one class of these authentication popups. You’ll also need to run:
sudo DevToolsSecurity --enable
Per Apple’s man page on this tool:
On normal user systems, the first time in a given login session that
any such Apple-code-signed debugger or performance analysis tools are
used to examine one of the user’s processes, the user is queried for
an administator password for authorization. DevToolsSecurity tool to
change the authorization policies, such that a user who is a member of
either the admin group or the _developer group does not need to enter
an additional password to use the Apple-code-signed debugger or
performance analysis tools.
Only issue is that these same things seem to be broken once I upgraded to Xcode 6. Back to the drawing board....