capistrano-plugins / capistrano-secrets-yml Goto Github PK
View Code? Open in Web Editor NEWHandles deploying secrets.yml file with Rails 4.1+
License: MIT License
Handles deploying secrets.yml file with Rails 4.1+
License: MIT License
When running
bundle exec cap production secrets_yml:setup
I get the following error:
NoMethodError: undefined method `start_with?' for #<Pathname:PATH/config/secrets.yml>
/RVM/gems/ruby-2.4.1/gems/sshkit-1.15.0/lib/sshkit/backends/netssh.rb:66:in `upload!'
/RVM/gems/ruby-2.4.1/gems/capistrano-secrets-yml-1.0.0/lib/capistrano/tasks/secrets_yml.rake:42:in `block (3 levels) in <top (required)>'
I was able to fix the problem by modifying the rake task, but someone else might run into this.
Suppose I have a webhook URL for a Slack channel in my secrets.yml, and I want to notify a slack channel once a deployment finished (so in a Capistrano after task) what should I do ? How do I read the secret from Capistrano ?
As title describes, the gem fails for users of Ruby 3.2.0, because it relies on a call to the exists? alias method to the exist? method, which has been deprecated since Ruby 2.1 and was finally removed in Ruby 3.2.0.
my setup works correctly up to commit
56ced4f (Switched upload! to Net::SCP.upload! so we can use new...)
if I upgrade past this, then I get the following error
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Net::SSH::ConnectionTimeout
Caused by:
Net::SSH::ConnectionTimeout: Net::SSH::ConnectionTimeout
Caused by:
Errno::ETIMEDOUT: Operation timed out - connect(2) for 138.68.118.166:22
from the port, it looks like this is trying to connect on port 22 where it should be on port OTHER_PORT
I'm currently setting the port like so...
server 'beta.nurtureit.io', user: 'webuser', roles: %w{app db web}, port: OTHER_PORT
is there a different setting I should use, or is this a bug with secrets not using the port that other tasks use?
bundle exec cap production setup
I get
Error - please remove 'config/secrets.yml' from git:
$ git rm --cached config/secrets.yml
and gitignore it:
$ echo 'config/secrets.yml' >> .gitignore
I did git rm --cached config/secrets.yml
. It says it's already gone, as it indeed is.
All these things are taken care of. Are you still maintaining?
I'm trying to use this gem with a specific user, "deploy". I can see from the docs that it says:
"secrets from your local secrets.yml are copied to the servers in your config/deploy/{environment}.rb files using the user: value. a."
I'm not quite sure what this means, or how to set the user value or if it relates to the ssh user. I'm happy to submit a pull request where the user can be specified in the task.
I've had to unpack the gem and change the string manually for now.
Would be nice to get your opinion :)
In a typical Rails application there is a database.yml
file, which should be handled the same as secrets.yml
. Creating another plugin (like "capistrano-database-yml") seems to be odd, what about enhancing this repo to handle both yaml files?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.