Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email sending issue #283

Closed
cespare opened this issue Jul 20, 2012 · 13 comments
Closed

Email sending issue #283

cespare opened this issue Jul 20, 2012 · 13 comments

Comments

@cespare
Copy link
Contributor

cespare commented Jul 20, 2012

Via email:

I try to install barkeep and followed your instructions from the wiki. We got it up and running, but are unable to send mails on commands and so on. Every time I try to send a email i get:

Net::SMTPAuthenticationError 535-5.7.1 Username and Password not accepted. Learn more at /home/barkeep/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/net/smtp.rb:966:in `check_auth_response' /home/barkeep/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/net/smtp.rb:7

in http://our-host:8040/admin/diagnostics. I'm on Ubuntu 12.04, added a user barkeep and this user is running the app, also I added ~/.barkeep_creds.rb

Fezzik.destination :my_company do
  Fezzik.env :gmail_address, "myUser@googlemail.com"
  Fezzik.env :gmail_password, "myPass"
  Fezzik.env :cookie_session_secret, "myCookie"
end

and this credetials are correct, but it doesn't work. I start it inside the barkeep repo with:

bundle exec foreman start

Unfortunally I didn't found anything in your wiki regarding setup this mailing stuff on a local installation. We want to use it for code reviews of our projects but this mailing stuff is important. Can you give me a hint what I'm doing wrong?

@philc
Copy link
Contributor

philc commented Jul 20, 2012

We should help troubleshoot this, add more explanatory errors to the codebase, and add a doc on the wiki.

@mschaaf
Copy link

mschaaf commented Jul 20, 2012

+1

@SirkoMann
Copy link

Hi,

we found out the problem is that ~/.barkeep_creds.rb will not be used. After putting the credentials in $BARKEEP_HOME/environment.rb it works without any problems.
Thanks,
Sirko

@philc
Copy link
Contributor

philc commented Jul 20, 2012

@SirkoMann that is a workaround which will work, but you shouldn't need to go through that hassle. I suspect we need to improve the docs around keeping secret creds outside of the repo. Do you have BARKEEP_CREDENTIALS set as an env variable on the machine you're deploying from? Try this:

$ env | grep -i barkeep

Here's my output:

BARKEEP_CREDENTIALS=/Users/philc/.barkeep_creds.rb

@SirkoMann
Copy link

@philc for sure i exported the 'BARKEEP_CREDENTIALS' environment variable. Here is my output:
barkeep@blade:$ pwd
/home/barkeep
barkeep@blade:
$ ls -ahl
total 64K
drwxr-xr-x 8 barkeep barkeep 4.0K Jul 20 17:00 .
drwxr-xr-x 4 root root 4.0K Jul 18 10:06 ..
drwxr-xr-x 19 barkeep barkeep 4.0K Jul 20 16:48 barkeep
-rw-rw-r-- 1 barkeep barkeep 201 Jul 20 14:36 .barkeep_creds.rb
drwxrwxr-x 4 barkeep barkeep 4.0K Jul 18 12:18 barkeep_repos
-rw------- 1 barkeep barkeep 3.4K Jul 20 17:00 .bash_history
-rw-r--r-- 1 barkeep barkeep 220 Apr 3 17:58 .bash_logout
-rw-rw-r-- 1 barkeep barkeep 119 Jul 19 11:39 .bash_profile
-rw-r--r-- 1 barkeep barkeep 3.5K Jul 19 11:37 .bashrc
drwx------ 2 barkeep barkeep 4.0K Jul 18 10:49 .cache
drwxrwxr-x 3 barkeep barkeep 4.0K Jul 18 10:45 .gem
-rw------- 1 barkeep barkeep 1.1K Jul 20 17:00 .mysql_history
-rw-r--r-- 1 barkeep barkeep 675 Apr 3 17:58 .profile
drwxr-xr-x 10 barkeep barkeep 4.0K Jul 18 10:37 .rbenv
drwx------ 2 barkeep barkeep 4.0K Jul 19 12:05 .ssh
-rw------- 1 barkeep barkeep 1.2K Jul 20 14:51 .viminfo
barkeep@blade:$ !echo
echo $BARKEEP_CREDENTIALS
/home/barkeep/.barkeep_creds.rb
barkeep@blade:
$
As I mentioned before, it's working like a charme now. :D

@cespare
Copy link
Contributor Author

cespare commented Jul 21, 2012

@SirkoMann hmm, is that on the box you're running Barkeep on, or the one you deployed from?

BARKEEP_CREDENTIALS needs to be set on the box from which you're deploying.

@SirkoMann
Copy link

@cespare
I checked out the repo and I start barkeep inside the repo with: bundle exec foreman start
than we have access to it on http://blade.local.domain/8040

@philc
Copy link
Contributor

philc commented Jul 21, 2012

@cespare it may be the case that we're not using BARKEEP_CREDENTIALS in development =)

@SirkoMann
Copy link

Hi,
now we have working email sending and it's great, but now we found that on commenting on a commit, all people are getting a notification mail. It would be really helpful if only the the person who made the commit and the person who commented get a notification mail. Is this already possible? Can't find anything regarding this in your documentation.

Thanks,
Sirko

@cespare
Copy link
Contributor Author

cespare commented Jul 24, 2012

@SirkoMann the emails should say why they're being sent. In this case, other people should get emails only if they have a saved search covering the commit with the "Email me new commits" box checked.

I'm closing out this ticket as the original issue has been fixed.

@cespare cespare closed this as completed Jul 24, 2012
@anandvamsi
Copy link

Hi SirkoMann,

can u please guide how u configured the email system in barkeep esp the config file and location and all. which file i need to edit?

@SirkoMann
Copy link

@anandvamsi
sure.. :D
open the environment.rb

$EDITOR $BARKEEP_HOME/environment.rb
and in the file change

GMAIL_ADDRESS = "you@gmail.com
GMAIL_PASSWORD = "password"

that's it. Seems that the $BARKEEP_CREDENTIALS will not used.

barkeep@blade:~$ echo $BARKEEP_CREDENTIALS
/home/barkeep/.barkeep_creds.rb

@cespare
Copy link
Contributor Author

cespare commented Aug 4, 2012

environment.rb is used when you run barkeep locally. $BARKEEP_CREDENTIALS is the used when you deploy Barkeep to a production server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants