-
Notifications
You must be signed in to change notification settings - Fork 35
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
authkey? #45
Comments
See #47 |
Hmn yes ... maybe. I'll have to look into it. I'm not quite sure that's what I was looking for. I already have the credentials in a different json file for a plugin i use in Sublime Text, I just want to be able to read them from there ;) Edit: Nevermind, I have to read up on my Node ....
|
Yeah, you could all have the environment variable named the same but pointing to different keys on each developer's machine |
Well, all this info is already in a different file. I use the SFTP plugin for Sublime Text, and this plugin already requires the credentials to be in a json formattede file. So I just wan't to read the info from there. |
Oh, then you could modify the function getAuthByKey (inKey) {
if (fs.existsSync(inKey)) {
var tmpStr = grunt.file.read(inKey);
var retVal = null;
if (inKey !== null && tmpStr.length) retVal = JSON.parse(tmpStr)[inKey];
return retVal;
} else {
var tmpStr;
var retVal = null;
if (fs.existsSync('.ftppass')) {
tmpStr = grunt.file.read('.ftppass');
if (inKey !== null && tmpStr.length) retVal = JSON.parse(tmpStr)[inKey];
}
return retVal;
}
} |
FWIW -- I had a similar thought, that the auth might be
Then the code could auto-lookup the sshkey from the users home directory. But maybe that's putting too much information into a repository? (host name && user name in a repository both could be a risk?)
Works ... |
I wish I could give it the host and port only and it would ask for username and password when I ran grunt sftp-deploy:dist |
Is it possible to connect without setting the authkey and setting the credentials directly in the auth object?
I am making a simple deploy file for work, and we all share the same user, but different ssh keys. I just want to make it easy to send around 1 file instead of multiple.
The text was updated successfully, but these errors were encountered: