laravel homestead cannot create project - laravel-5

I have download homestead box manually, and add it to vagrant like: "vagrant box add laravel/homestead virtualbox.box".
Then I run command "vagrant init laravel/homestead" to create a new development environment.
Now I can start the virtual machine by "vagrant up".
I login into the new virtual machine by "vagrant ssh".
I run command "composer create-project laravel/laravel new-site" to create new project, but it always give error that authentication required (packagelist.org)

Do you setting up your SSH keys in the Homestead.yaml file?? It's necessary to add this SSH keys.
For that you can also prefer this: https://laravel.com/docs/5.1/homestead#installation-and-setup
May be it's helpfull for you..!!

Related

Error executing NPM INSTALL inside Homestead

We are developing an app in Laravel, and we created a new project, we have an error when trying to run NPM INSTALL inside Homestead.
**We are using:
Vagrant 2.2.9
NPM 6.14.10
Node 12.20.0
The last homestead version
We tried:
Deleting node_modules
Deleting composer.json.lock
Cleaning cache
Reinstalling the virtual machine with the last version
And other stackoverflows.
But the solutions dont work.
And we can't run npm install. The error is: no such file or directory open 'home/vagrant/code/testing/node_modules/yargs/node_modules/cliui/package.json.3695679736' This is related to npm not being able to find a file.
Can you help me please?
Thanks.
I found the solution, you need to:
install NFS in your local machine (sudo apt-get install nfs-kernel-server) if u are using ubuntu, check how to do it in windows.
add type: "nfs" in your Homestead.yaml after folder mapping
vagrant reload --provision
And thats it. trying npm install now is working ok!

How I create a private key for my Laravel application

I'm trying to get started with the latest Laravel. I had just created my Laravel from the command line via the command composer create-project --prefer-dist laravel/laravel my-app
I have installed Homestead and now trying to create Vagrant box with the command
vagrant up
I'm getting the error, check your Homestead.yaml (or Homestead.jso) file, the path to your private key does not exist
To which I ran the command
ssh-keygen -t rsa -f ~/.ssh/id_rsa
Now I'm getting the error Saving key "~/.ssh/id_rsa" failed: No such file or directory
I'm running Windows 10

Laravel 5.3 Deployment Tool

Just finished developing a web application using laravel 5.3, how can i create an installation procedures (html,script) like that of wordpress that will create database,run a script to create tables, create .env file and sort of stuff/
Is there any package that can do this?
Thanks.
If you use homestead or vagrant you could write a script to configure your bootstrap.sh and vagrantfile to provision your box and install your box. Then have it vagrant up to start your box.
bootstrap.sh file can be found https://www.vagrantup.com/intro/getting-started/provisioning.html. Homestead has a folder scripts that shows all the different scripts and the configuration that can be used to provision your box. You would simply just write a script to automate the installation of homestead or vagrant and that should be it.
If you are pushing this out into the wild and need to automate builds, run unit tests and create migrations you could use https://jenkins.io/

Homestead and Laravel basis understanding

I have some questions about the basis understanding about homestead and laravel.
I have set up my homestead with this guide: https://laravel.com/docs/5.2/homestead and it works ok.
1) But when I vagrant ssh into my box, I can call composer, but I can't call laravel or php artisan. Have I done something wrong/misunderstod something?
2) Do I need to install php and laravel locally, can't I just run it on my VM like i do now?
To call php artisan commands (after you ran vagrant ssh command) you need to have installed Laravel project and you need to be in project's root folder:
cd my-laravel-project
php artisan

Laravel installed but confusion remains

I have ubuntu 14.04 and LAMPP is installed. I was learning Laravel 4, but get a lot of confusion on it's documentation, below I list few of issue.
How to install laravel?
what I did :
copy github repository into /opt/lampp/htdocs/larva and run composer install, Laravel is installed and I can access it with http://localhost/larva
What is homestead? is that another way to install laravel or this is additional thing?
What is artisan? if I use artisan then do we need to use homestead also?
what I did ( in terminal )
cd /opt/lampp/htdocs/larva
php artisan serve
it started the service and I can access laravel with htpp://localhost:8000 BUT if i close this terminal then URL is lost
and there is one other way is using vagrant? do we need to use vagrant if we installed it already?
one more thing is Nginx?
overall these vagrant, Nginx, Homestead, artisan,and composer methods create such a mess.
Please clear the clouds and please do not mention what is vagrant Nginx and all. I just want to know that do I need to do something with Homestead and vagrant if i have installed using git repository and composer way?
Thanks
Laravel Homestead is an official, pre-packaged Vagrant "box" that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.
Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component.
When you close the terminal, you are stopping the service on port 8000. You always can create a virtual host, and point its root to your larval installation /public directory
you dont have to use vagrant to run laravel. Vagrant is just your 'bridge' to Virtual Mashine.
If you installed LAravel via composer and you got it work on localhost:8000 then you dont need neither homestead or vagrant

Resources