How do I remove a subdomain that I created on meteor.com - meteor

I created a subdomain on meteor.com to try it out, but now I'm moving on to a new domain so want to remove the existing subdomain on Meteor. I didn't set any password to the subdomain. I'm really confused on how to remove it from meteor.com. I also deleted the local repository that I had from my machine. Please help.

You can do it through the command line like you did to deploy on meteor.com.
To delete a meteor.com deployment, just run the same command with the --delete flag:
# navigate to your Meteor project
cd /...
meteor deploy --delete
According to the command documentation:
The --delete flag permanently removes a deployed application, including
all of its stored data.
You can always get more information about a command by running meteor help followed by the command name:
meteor help deploy

Just wanted to make an addition to it for those following this thread.
meteor deploy <example.meteor.com> --delete (This is the proper command. Replace example with your subdomain)
You might want to login to your local repo before initialising the --delete command
meteor login --email 'email-id-used-to-login-at-meteor.com'
You'll be prompted to input email-id and password. Then you're logged in!
Hope this helps.

Related

firebase CLI will not recognize current directory for 'firebase init'

I am following a tutorial on Ionic Angular and it has come to the point where the instructor is having me publish my code to Firebase Hosting. First I used NPM to install the Firebase CLI. Then I was instructed to use the firebase init command. The issue is that the CLI doesn't seem to recognize the current directory that is selected in my terminal.
I run: cd /Users/MyUserName/myProjectsFolder/myProject/
Then I run firebase init and it displays:
You're about to initialize a Firebase project in this directory:
/Users/MyUserName
When I would expect it to read:
You're about to initialize a Firebase project in this directory:
/Users/MyUserName/myProjectsFolder/myProject
A little bit of googling found this page:
https://firebase.google.com/docs/cli/
Which includes this passage:
To initialize a new project directory, change directories in the terminal to your desired project directory and run: firebase init
Based on this I would expect the steps I took to work.
I am confused. Has anyone ever run into this behavior? Can anyone think of a way to get the CLI to function as expected?
Thanks.
Got to folder:
/Users/Username/
Search for a file with name of firebase.json and Delete it.
Reinstall firebase tool with this command (--unsafeper- to avoid
permissions error messages & use sudo):
$ sudo npm install --unsafeper- -g firebase-tools
Then, go to your pubilc folder (you have to create one) which
contains your HTML, JS, images and CSS files and use this command:
$ sudo firebase init
$ sudo firebase deploy
The reset is easy and as mentioned in the firebase
docs:
https://firebase.google.com/docs/hosting/quickstart
The reason is that you must have initiliazed a project in some parent directory (of this myProject folder) in the past. Somehow firebase sees that project in that directory rather than initializing a new project in the current path.
Solution:
Check the parent directories of the path where you want to initialize a firebase project now. Delete / Move the firebase files from that folder and then you should be able to initialize a project in the current directory.
For example:
I also faced the same problem.
I was trying to initialize a project in this path:
D:\Work\Projects\myProject
But somehow it always got initialized in this path:
D:\Work
After some searching it turned out that the reason was that I had initialized a project in
D:\Work directory. I moved those files to another folder and that solved the problem.
I was also facing this problem and windows not able to recognize the firebase. I don't know the exact reason why it was behaving in such a manner but it solved the problem.
1) I installed the firebase-tools using a command on command prompt
npm install -g firebase-tools
and it didn't work.
2) I restarted the machine.
3) then again I executed the same command from step 1) npm install -g firebase-tools
and it worked.
Was trying to do this and discovered a command that allows "firebase" as a command.curl -sL https://firebase.tools | bash This will allow $ firebase login and $ firebase init to work.
I was facing the same issue. After checking the log I figured out that the Authentication token was expired from my firebase cli login session. So I logged out and Logged-In again to the firebase cli using Firebase logout And firebase login command. Problem solved.
To check out your issue go to firebase log using firebase-debug.log command.
And take required steps.

Using http for a different github account

I'm trying to connect using http for a second github account I've recently set up. When I pushed to https://github.com/usernameOf2ndGithubAccount/repo.git, I always got the following error:
remote: Permission to usernameOf2ndGithubAccount/repo.git denied to usernameOf1stGithubAccount
That means I've probably made the username of my 1st github account as the default somewhere. But I've looked through all my environment variables and bashrc but couldn't find it to be set anywhere. Can someone please point out how to fix this issue? Thanks!
P.S. I've tried connecting using ssh for my 2nd github account (by using a new pair of private/public key), and that works fine.
You can specify the username to use in the URL, e.g.:
https://usernameOf2ndGithubAccount#github.com/usernameOf2ndGithubAccount/repo.git
When you set-up git, it will ask for a username and email. This will we global for all your repositories.
You could see your name and email with (which could be different for each repository)
git config user.name
git config user.email
You could change it as follows (only for the current git repository)
git config user.name "myname"
git config user.email "my#email.com"
To see your/update global config, pass --global (after config), e.g.
git config --global user.email
When using TortioseGit, you could easily view and change with a GUI.
This is windows credential manager problem. Nothing to do with SSH or HTTPS. You need to add the second account to the manager. It only reads the github site not the direct https path.
Bash terminal git config --global credential.useHttpPath true
this will add the direct path not just the github site.

See git commit hash of running Dokku app?

I am running a Dokku app in production and need to know what version of the app is running on the server.
Is this possible with Dokku?
There's no need for a plugin.
All apps in dokku are git bare repositories. Just connect to your server, switch to the app directory (mine are in /home/dokku/<app-name>) and run a git log. That should do the trick as well.
To get the current git commit hash for a dokku app just run
dokku config:get <myapp> GIT_REV
Yes, you can add the SHA1 of the latest git commit using this plugin: https://github.com/dokku-alt/dokku-alt/tree/master/plugins/dokku-git-rev
There are many other alternatives based on different scenarios and different environments. If you are deploying Node.JS apps and using package.json properly, you can easily parse out the version using the fs standard lib; JSON.parse(fs.readFileSync('package.json')).version
You can also do dokku config:show myapp | grep GIT_REV to get it from the app's environment variables. The above command assumes your app name is myapp.
The fastest way to do this is to issue this command:
dokku config:get GIT_REV
This queries the server for the git revision that was most recently deployed. During deployment the GIT hash is set as an envirnoment variable, that's why it's possible to get with config:get.
You can also just bash into your doku app and echo $GIT_REV

How to correctly install dokku - with or without sudo?

I'm learning dokku right now for simple web deployment. Offical install instructions state this command:
wget -qO- https://raw.github.com/progrium/dokku/v0.3.12/bootstrap.sh | sudo DOKKU_TAG=v0.3.12 bash
I'm not a devop or admin, but as far as I understand this line, it performs all bootstrapping and installation under the root account, thanks to sudo. So dokku will be checked out into a directory with root access rights, and all additional directories like /var/lib/dokku/ will also have root access rights.
The problem is - all articles across the internet about dokku instructs to execute dokku command or do dokku-related actions without sudo. For example, instructions about this dokku database plugin, https://github.com/krisrang/dokku-mariadb, instructs to install it via:
cd /var/lib/dokku/plugins
git clone https://github.com/krisrang/dokku-mariadb mariadb
dokku plugins-install
This is not working, since /var/lib/dokku/plugins have root access rights and git clone will fail with acces denied. It's hard to be a non-admin nowadays, but maybe someone will hint what I'm doing wrong? Do I need to install dokku some other way, or all dokku-related tutorials across internet assume that I'm executing them under root (which is, by my limited admin knowledge, highly not recommended for security reasons).
You should run those three commands as sudo:
sudo su -
The dokku binary will run code as the dokku user even if you execute as root. So it should be fine to run that as is. Once you are the sudo user, just run the install instructions listed in your question. Hope my answer helps ! :)
I also contacted them as they mentioned:
In the future, we'll have a method to install plugins directly with a
dokku command
As far as I can tell, you need to run it as root. A traditional way to install a program without root-privileges is to download the source and compile it, which can be done by running:
git clone https://github.com/progrium/dokku.git
make
make install
Dokku's makefile depends on apt-get, which requires root access to run.
I'm not familiar with dokku or dokku-mariadb, but I think the author of dokku-mariadb also assumes root access.
For people running into the question on wether its fine to install through root user (on fresh created VMs as per the guide), try checking this Github issue:
https://github.com/dokku/dokku/issues/961
Since the commands related to dokku are prefixed with # rather than $, it means that its not necessary to run them from non-root user. It also makes writing suddo unnecessary (and form my experience counterproductive).

Deployment with Password using Linux in Meteor?

How to deploy a app with password in meteor using linux. It's deploy good when with out set password.But i need to deploy app with password in meteor. I did but gets some error messages i didn't understand the following messages.So please see the below deployment process and suggestions me what to do?
[root#localhost myapp]# meteor deploy myapp.meteor.com --password
deploy: the --password option needs a value.
Try 'meteor help deploy' for help.
[root#localhost myapp]# meteor deploy myapp.meteor.com 123456
deploy: too many arguments.
Usage: meteor deploy <site> [--settings settings.json] [--debug] [--delete]
Deploys the project in your current directory to Meteor's servers.
You can deploy to any available name under 'meteor.com'
without any additional configuration, for example,
'myapp.meteor.com'. If you deploy to a custom domain, such as
'myapp.mydomain.com', then you'll also need to configure your domain's
DNS records. See the Meteor docs for details.
The --settings flag can be used to pass deploy-specific information to
the application. It will be available at runtime in Meteor.settings, but only
on the server. If the object contains a key named 'public', then
Meteor.settings.public will also be available on the client. The argument
is the name of a file containing the JSON data to use. The settings will
persist across deployments until you again specify a settings file. To
unset Meteor.settings, pass an empty settings file.
The --delete flag permanently removes a deployed application, including
all of its stored data.
Options:
--delete, -D permanently delete this deployment
--debug deploy in debug mode (don't minify, etc)
--settings set optional data for Meteor.settings
--star a star (tarball) to deploy instead of the current Meteor app
[root#localhost myapp]#
Perhaps you should use both command and option:
meteor deploy myapp.meteor.com --password 123456

Resources