GithubHelp home page GithubHelp logo

forge-cli's Introduction

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.

If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

forge-cli's People

Contributors

alejandrotrevi avatar arnebr avatar caneco avatar driesvints avatar hajmo avatar ianrodrigues avatar jbrooksuk avatar lotharthesavior avatar michaeldyrynda avatar morales2k avatar nunomaduro avatar pxlrbt avatar stylecibot avatar taylorotwell avatar tkuijer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forge-cli's Issues

Pull in functionality from BeyondCode's predecessor

Hi,

I have been using BeyondCodes forge-cli package before and they have 2 very useful features that would definitely enhance this package:

  1. Manage environment files (similar to it already exists in Laravel vapor-cli)
  2. Syncronize configuration into a forge.yml. This will store the server setup in version control which makes it so much easier to set up new servers, restore the configuration, ... while it is all version controlled. (also similar to Laravel Vapor's vapor.yml)

This is the link to the repository: https://github.com/beyondcode/forge-cli

Is this something that is planned or you are open to add to this CLI package?

possible to clone site/server configuration? + idea

i am managing a lot of sites (20+) on many servers and i find it a huge effort to manage my servers from the forge web dashboard.

this means that there are basically (20 + server amount) * configuration sections different configuration pages in forge that need to be configured which is huge and hard to manage.

i also often need to clone a site (and server) for clients and i did not find a clone server/site option in forge. (maybe i missed it?)

so to fix this problem i thought of a better way to solve this: introduce .toml configuration files

this would basically solve all these issues because:

  1. you have a single file that contains all configuration (so you dont need to switch between sites and tabs all the time)
  2. they can easily be copied to new codebases which makes it easy to clone sites/servers
  3. they are version controlled so you have a history of all changes
  4. if you have employees you can make sure for configuration changes to be reviewed via a pull request
  5. maybe even more benefits i have not thought of

let me know what you think and if something like file-based configurations have been considered :)

array_map() Error with Forge CLI 1.8.0 on Darwin OS

Forge CLI Version

1.8.0

PHP Version

8.2.9

Description

Encountered an array_map() error in Forge CLI version 1.8.0 when trying to deploy a website using the forge deploy command.

Environment

  • Forge CLI Version: 1.8.0
  • PHP Version: 8.2.9
  • Operating System: Darwin

Expected Behavior

Expected the website to deploy without errors.

Actual Behavior

Received an error message stating:

array_map(): Argument #2 ($array) must be of type array, string given.

Additional Information

The issue appears consistently when attempting to deploy using the forge deploy command.

Error Message

image

Steps To Reproduce

  1. Run the command forge deploy [WEBSITE_NAME] to deploy a website.
  2. Encounter the array_map() error.

Error Message: Trying to access array offset on value of type null.

  • Forge CLI Version: 1.1.0
  • PHP Version: 8.0.3

Description:

When using forge ssh:configure I get an error. After selecting the server, creating a new key and naming it I get Error Message: Trying to access array offset on value of type null.

Steps To Reproduce:

forge ssh:configure
server id
0 (create new key)
ssh key name

Then error shows

Unable to login

  • Forge CLI Version: #.#.#
  • PHP Version: #.#.#

Description:

Tried to use forge login with forge api token from windows system, but got errors:
An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

  • Forge CLI Version: 1.1.0
  • PHP Version: 7.3.21
  • Operating System: WINNT
  • Error Message: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.h
    axx.se/libcurl/c/libcurl-errors.html) for https://forge.laravel.com/api/v1/user.

Please let me know how to fix it.

Thanks!

Steps To Reproduce:

Unexpected Error

Forge CLI Version

1.8

PHP Version

8.2

Description

An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

  • Forge CLI Version: 1.4.0
  • PHP Version: 8.2.8
  • Operating System: Darwin
  • Error Message: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in phar:///User
    s/david/.composer/vendor/laravel/forge-cli/builds/forge/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98.

Steps To Reproduce

composer require laravel/forge
forge login

[ERROR] Your system is not ready to run the application.

  • Forge CLI Version: 1.3.4
  • PHP Version: 8.0.6
  • MacOs: 12.0
  • Processor: M1 Pro

Description:

I am trying to run Forge CLI but get an error message that I am not running a higher version than PHP 7.3 but I'm running it with PHP 8.0.6.

Box Requirements Checker
========================

> Using PHP 8.0.6
> PHP is using the following php.ini file:
  /usr/local/etc/php/8.0/php.ini

> Checking Box requirements:
  E.

                                                                                
 [ERROR] Your system is not ready to run the application.                       
                                                                                

Fix the following mandatory requirements:
=========================================

 * The application requires the version "^7.3" or greater.

Steps To Reproduce:

  1. Open Terminal
  2. Run command: forge

Ability to create sites from the command line using `forge site:create`

Perhaps this is outside the scope of the Forge CLI, but being able to create a site via the command line would be very useful. For instance—

forge site:create
  --server=serverId
  --domain=example.com
  --alias=example.org
  --alias=another-site.net
  --phpversion=8.0
  --directory=/public

PHP version error while version is >7.3

  • Forge CLI Version: 1.1
  • PHP Version: 8.0.9 (default brew install on mac m1)

Description:

$ forge

Box Requirements Checker

Using PHP 8.0.9
PHP is using the following php.ini file:
/opt/homebrew/etc/php/8.0/php.ini

Checking Box requirements:
E.

[ERROR] Your system is not ready to run the application.

Fix the following mandatory requirements:

  • The application requires the version "^7.3" or greater.

Steps To Reproduce:

Instructions as on forge cli website : composer global install laravel/forge-cli
forge

[DEPLOY] strpos(): Empty needle In RemoteRepository.php line 121

OS: Mac 11.5.1 (Intel)
CLI Version: 0.1.2
PHP Version: 7.4
Target server PHP version: 7.4
Command: forge deploy (interactively)

Steps:
Run command
Typed out site id from list
Saw Queueing, Waiting, and Deploying.

Received:
strpos(): Empty needle in RemoteRepository.php line 121

Expected:
Deploy steps and a success

FWIW, the deploy finished/completed on the server.

Screen Shot 2021-08-02 at 8 07 41 PM

Can't push environment file

Forge CLI Version

1.8.0

PHP Version

8.3.1

Description

forge env:push api.signalspot.io .env.production
==> Uploading [.env.production] Environment File

An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

  • Forge CLI Version: 1.8.0
  • PHP Version: 8.3.1
  • Operating System: Darwin
  • Error Message: {
    "message": "Server Error"
    }.

Steps To Reproduce

Just trying to push env file

Command output out of sync - returning previous command

  • Forge CLI Version: Forge CLI 1.4.0
  • PHP Version: 8.1.12

Description:

Somehow running commands via the Forge CLI got out of sync with the results from the server, and as such every subsequent command returns the output from the previous command. The output looks fine when viewing commands on the Forge website, it's only the commands through the CLI.

I'm guessing it's running the command and then returning the last command execution output, and somehow one of the previous commands failed, causing it to have the previous command output in the queue to be returned. It seems to be a problem somewhere on Forge's side. I can't see any local directory on my system or the servers that contain the output, and it is affecting all of my servers that I've tested with.

Steps To Reproduce:

I don't know what caused it, but you can see it in action here:

valorin@Eowyn:~/dev/wevsite (main * u=)$ forge command withextraveg.net --command="php artisan env"
==> Queuing Command
==> Waiting For Command To Run
==> Running


  Event unresolvable.


valorin@Eowyn:~/dev/wevsite (main * u=)$ forge command withextraveg.net --command="php artisan env"
==> Queuing Command
==> Waiting For Command To Run
==> Running

  ▕ Current application environment: production

==> Command Run Successfully.
valorin@Eowyn:~/dev/wevsite (main * u=)$ forge command withextraveg.net --command="php artisan list"
==> Queuing Command
==> Waiting For Command To Run
==> Running

  ▕ Current application environment: production

==> Command Run Successfully.

Note that I ran the artisan env command twice, and the initial time it failed, with the two subsequent command executions returning the output from artisan env, with the output from artisan list not being displayed.

Failed deployment message exception on forge deploy

  • Forge CLI Version: 1.4.0
  • PHP Version: 8.1.7
  • Operating system: Linux

Description:

Ran forge deploy [site] and got this error - the deployment did go ahead on Forge however.

==> Queuing Deployment
==> Waiting For Deployment To Start
==> Deploying


  An unexpected error occured. Please report this issue here:
  https://github.com/laravel/forge-cli/issues/new/choose

  - Forge CLI Version: 1.4.0
  - PHP Version: 8.1.7
  - Operating System: Linux
  - Error Message: array_map(): Argument #2 ($array) must be of type array, string given.

image

Steps To Reproduce:

  • run forge deploy example.com
  • See error

Hope this helps! Much 💖 for Forge

SSH with site isolation

It would be awesome if the forge ssh command took into account the isolated system user account rather than assuming forge.

Is that something you’d consider adding?

Deploy a specific branch from the command line

For our very small team's workflow, it would be helpful for anyone to be able to deploy any branch to the test server without needing to update the branch via the Forge web UI.

Something like:
forge deploy example.com feature-branch

This is maybe possible already by first using the Forge SDK and calling $site->updateGitRepository() before deployment, but would be nice to have it bundled in the Forge CLI.

Thanks for considering.

Save server and site configuration in file

Is it possible to store the site configuration in the repository?

When I deploy customers sites (this happens often unfortunately) in the company i always have to configure all the fields in the forge interface instead of being able to copy from another project like you can do in vapor for example.

Is this possible or do we have to configure this every time in the forge panel?

Thanks!

Forge reports error when attempting to ssh into remote server

  • Forge CLI Version: 1.40
  • PHP Version: 8.0.18

Description:

This is related to a couple of similar issues I have seen - namely #16 and #18

I am using Forge CLI v.1.4 on Ubuntu MATE 21.04. I am able to connect to machine manually via ssh and all is okay. The command proposed in issue #18: ssh -o "IdentitiesOnly=yes" -i ~/path/to/key forge@SERVER_IP also works for me but when using forge ssh:test I get Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?. When I deploy, with forge deploy. deployment is fine - i.e. it happens and the Forge UI records it appropriately however, the process disconnects with this error. Out of interest, I ran forge ssh:test -vvv which records an execption:

me@machine:/var/www/mysite/dev$ forge ssh:test -vvv

Box Requirements Checker
========================

> Using PHP 8.0.18
> PHP is using the following php.ini file:
  /etc/php/8.0/cli/php.ini

> Checking Box requirements:
  ✔ The application requires the version "^8.0" or greater.
  ✔ The application requires the extension "zlib".
  
                                                                                                                                       
 [OK] Your system is ready to run the application.                                                                                     
                                                                                                                                       

==> Establishing Secure Connection

In Application.php line 124:
                                                                                          
  [LaravelZero\Framework\Exceptions\ConsoleException]                                     
  Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?  
                                                                                          

Exception trace:
  at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/framework/src/Application.php:124
 LaravelZero\Framework\Application->abort() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/foundation/src/Illuminate/Foundation/helpers.php:44
 abort() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/foundation/src/Illuminate/Foundation/helpers.php:64
 abort_if() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Repositories/RemoteRepository.php:176
 App\Repositories\RemoteRepository->App\Repositories\{closure}() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/spatie/once/src/functions.php:40
 once() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Repositories/RemoteRepository.php:177
 App\Repositories\RemoteRepository->ensureSshIsConfigured() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Commands/SshTestCommand.php:44
 App\Commands\SshTestCommand->handle() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/BoundMethod.php:36
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Util.php:41
 Illuminate\Container\Util::unwrapIfClosure() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/BoundMethod.php:93
 Illuminate\Container\BoundMethod::callBoundMethod() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/BoundMethod.php:37
 Illuminate\Container\BoundMethod::call() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Container.php:653
 Illuminate\Container\Container->call() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/console/Command.php:136
 Illuminate\Console\Command->execute() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/app/Commands/Command.php:103
 App\Commands\Command->execute() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/console/Command.php:121
 Illuminate\Console\Command->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Application.php:989
 Symfony\Component\Console\Application->doRunCommand() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/console/Application.php:102
 Illuminate\Console\Application->run() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php:129
 Illuminate\Foundation\Console\Kernel->handle() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/laravel-zero/framework/src/Kernel.php:95
 LaravelZero\Framework\Kernel->handle() at phar:///home/me/.config/composer/vendor/laravel/forge-cli/builds/forge/forge:36
 require() at /home/me/.config/composer/vendor/laravel/forge-cli/builds/forge:14
 include() at /home/me/.config/composer/vendor/bin/forge:117

Steps To Reproduce:

  1. Configure ssh with ssh:configure
  2. Execute forge ssh:test or forge deploy

Deployment without SSH

Hey guys!

Our problem

We have our Laravel application in a self-hosted GitLab. Here we want to trigger the deployment via Forge in a CI job. The CI instance that runs Forge CLI needs SSH access to the server. However, this is not easily possible for us/Only associated with great effort. Nevertheless, the message "Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH key?" appears, the deployment starts and runs successfully. We just don't get any current deployment logs -which we don't need anyway.

Our idea

Now the question is, if it's useful to extended the CLI tool and introduce sth. like forge deploy mylittlepony.com --no-ssh. This command would start the deployment and then "only" checks whether the deployment has run successfully or not. Without any displayed logs.

The snag

Maybe the API of Forge has to be extended so that the current state of a deployment can be returned. But of course we do not know if this is possible at all. Currently it does not look like the API offers this functionality. (See: https://forge.laravel.com/api-documentation#deploy-now). However, we can see the status of a deployment in the UI (Deploying, Finished, Failed). So maybe the API could also provide this information?

What do you guys think about this?

Unspecific error message after branch name change

  • Forge CLI Version: 1.1.0
  • PHP Version: 7.4.20

Description:

An unexpected error occured. Please report this issue here:
  https://github.com/laravel/forge-cli/issues/new/choose

  - Forge CLI Version: 1.1.0
  - PHP Version: 7.4.20
  - Operating System: Darwin
  - Error Message: Failed to deploy. Please refresh the tokens in your Forge profile..

Steps To Reproduce:

Change the branch name on Github without updating the branch name at Forge, then try to deploy. The error message could if possible be more specific rather than Please refresh the tokens in your Forge profile...

Can't connect to laravel forge via cli ( cURL error 60: SSL certificate problem: unable to get local issuer certificate )

  • Forge CLI Version: 1.3.4
  • PHP Version: 8.0.11

Description:

Trying to connect to Laravel forge via CLI fails on both forge login and forge login --token=MY_PERSONAL_TOKEN

producing the following error:

An unexpected error occurred. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

Steps To Reproduce:

forge login

produces this aforementioned error.

image

PHP8 Version error

  • Forge CLI Version: 0.1.5
  • PHP Version: 8.0.8

Description:

I have PHP 8.0.8 installed but the software tells me that it is required PHP 7.3. I checked the composer.json of the package for missing version declaration and noticed there is only one pipe in "^7.3|^8.0". Is this the problem?

Screen Shot 2021-08-05 at 5 13 57 PM

Steps To Reproduce:

  1. Install PHP 8.0.8 on Mac via Homebrew
  2. Install latest forge-cli

SSHing in as the isolated PHP user in an isolated environment

As of now there is no way to log in as an isolated PHP user using the Forge CLI, as there is no option to select the SSH user on the fly. It would be great to override the "forge" user by doing something like: forge ssh mywebserver --user=examplecom, as the forge user doesn't have permissions to edit files for isolated users, naturally. I could of course su..

v1.8 (v1.7?) breaks PHP 8.0 support

Forge CLI Version

1.8.0

PHP Version

8.0.28

Description

Latest minor version removed support for php 8.0:

laravel/forge-cli[v1.7.0, ..., v1.8.0] require php ^8.1.0 -> your php version (8.0.28) does not satisfy that requirement.

I would consider this a braking change and to either bump major version number og fix braking change.

Steps To Reproduce

Try installing globally through Composer on any setup with php 8.0 installed.

Warning message following any command on fresh install (but all seems to be working)

  • Forge CLI Version: 1.4.0
  • PHP Version: 8.2.0
  • Operating System: Darwin (MacBook M2)
  • Error Message: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in phar:///Users/nathanjames/.composer/vendor/laravel/
    forge-cli/builds/forge/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98.

Description:

After each command, I am receiving the error message above. The actual commands all seem to be working as expected (eg. I can run forge ssh and get onto the server correctly, but they all show the below after running:

image

When running forge -h, the error message does not display.

This was the first use of composer on this machine, if that has any relevance.

There's a high chance this is something specific to my machine, but thought it'd be better to report just in case.

Update:

I've downgraded to php8.1 and the error has dissapeared - so it's definitely an issue with php8.2 compatability

Steps To Reproduce:

  • Install PHP 8.2
  • Install composer
  • Install forge

Following this, running even just forge gives this error, as well as running any forge command (e.g. forge server:current and forge ssh).

Error during `forge ssh:configure`

  • Forge CLI Version: 0.1.5
  • PHP Version: 7.4.3
  • Operating System: WINNT
  • Error Message: Trying to access array offset on value of type null.

Description:

Fatal error. VSCode automatically opened laravel\forge-cli\scripts\keysFactory.php.

Steps To Reproduce:

  • Run forge ssh:configure
  • Select server by typing in server's name
  • Use option 0 to create new key
  • See error

Error when entering `exit` on the server

  • Forge CLI Version: 1.4.0
  • PHP Version: 8.2.0
  • Operating System: Darwin
  • Error Message: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in phar:///Users/mykolanizriukhin/.composer/vendor/laravel/forge-cli/builds/forge/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98.

Description:

Got an error while exiting the server

Steps To Reproduce:

Enter exit when logged into the server

An unexpected error occured - no error message

An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

  • Forge CLI Version: 1.4.0
  • PHP Version: 8.1.3
  • Operating System: Darwin
  • Error Message: .
  • Running on an M1 pro macbook

Description:

I don't actually know what caused it to error. Standard forge setup, just doing a deploy and it threw this error with no error message. Fully understand if you'd like to just close this issue, due to lack of information, but I wanted to report it, just in case its useful.

Steps To Reproduce:

forge deploy {site}

Add ssh port

We use a non default ssh port for security reasons.
From hat I can see there is no way to change the ssh port at the moment?
Would be a nice feature.

List Site Directory

There is no way i can list files inside my site. I needed to my site directory and delete a file or copy file. It will be nice to be able to list the files directory for each site

Api Error

Forge CLI Version

1.8.0

PHP Version

8.2.12

Description

Retrieving The List Of Servers

An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

  • Forge CLI Version: 1.8.0
  • PHP Version: 8.2.12
  • Operating System: Darwin
  • Error Message: {
    "message": "Server Error"
    }.

Steps To Reproduce

forge server:list

Curl Error on Windows Environments

Hello,

on Windows Environments (whos using Windows wtf?) tested on two different machines
PHP 8.x installed per chocolatey package manager Curl errors occure on every Forge Curl Request.

In CurlFactory.php line 211:

  cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.htm
  l) for https://forge.laravel.com/api/v1/user

To fix this error you have to configure the curl pem certificates in your php.ini
https://stackoverflow.com/questions/29822686/curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate

Im no curl expert but maybe the requests have to be started with different params or the root certificate can be integrated into the cli ?

Windows Build Number:
21H1 19043.1110

Login fails with

Forge CLI Version

1.7.0

PHP Version

8.2.0

Description

I downloaded the latest version of Forge CLI.

I ran the command: forge login

Responds: Please Enter Your Forge API Token:

I enter my token that I get from: https://forge.laravel.com/user-profile/api

This following message shows:

`
An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

  • Forge CLI Version: 1.7.0
  • PHP Version: 8.2.0
  • Operating System: WINNT
  • Error Message: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https
    ://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://forge.laravel.com/api/v1/servers.
    `

Steps To Reproduce

Get API key from: https://forge.laravel.com/user-profile/api

Download latest version of Forge CLI.

Run command: forge login

Enter API key.

Use specified SSH key

Would be nice to be able to use a specific SSH key. We have about 30 servers in our Forge account and it's a bit cumbersome to add a specific Forge CLI key to every server, then multiply that with a couple of developers.

When we provision a new server SSH keys gets added for each developer and then we all can connect without adding the keys manually. Something like this perhaps:

$ forge server:current --key=my-key-that-is-added-to-all-servers.pub

Maybe I'm missing something, but I've read the docs and couldn't find an override.

Edit:
A thought would be to specify which keys to use in ~/.ssh/config, but then again, we have a bunch of servers which would make that a bit fiddly

Lack of Option to Disconnect Envoyer Projects in Laravel Forge

Forge CLI Version

1.8.0

PHP Version

8.1.26

Description

In the recent integration between Laravel Forge and Envoyer, I've encountered a significant limitation. Once a site is connected with Envoyer through Forge, there's no provided option in the user interface or the Laravel Forge API to disconnect that project from Envoyer.

Steps To Reproduce

  1. Connect a project from Laravel Forge with Envoyer.
  2. Look for the option to disconnect the project from Envoyer within the Laravel Forge interface or through the API.
  3. Note the absence of any function or button to perform this action.

Expected Outcome:

An explicit option should be available to disconnect a project from Envoyer within the Laravel Forge interface or through its API. This functionality is crucial to provide a complete experience and allow for full management of the connection between these services.

Impact:

The lack of this option makes it difficult for users to handle connections between Forge and Envoyer in a complete and efficient manner. This missing functionality can be critical for projects needing adjustments in their integrations or temporary disconnections.

Additional Information:

This issue limits users' flexibility and control over their integrations between Laravel Forge and Envoyer. Adding a feature to disconnect projects would be beneficial for those needing to adjust their configurations or make changes in the connection between both platforms.

Authenticating forge cli is failing

  • Forge CLI Version: 1.1.0
  • PHP Version: 7.4.22
  • Windows Version: 10 Pro

Description:

I wanted to give forge-cli a try. I installed it globally, grabbed an api token, then tried forge login. I got the following error
forge-cli-login-error

Steps To Reproduce:

  • Install forge-cli globally
  • Grab an api token
  • Try to login forge login

Error after deploying

  • Forge CLI Version: 0.1.5
    • PHP Version: 8.0.2
    • Operating System: WINNT
    • Error Message: Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?

Description:

When I deploy to the site, the deployment actually works and the site is deployed. Just a weird thing after that. I get an error, Unable to connect to the remote server. I have the connection working hence I can deploy.

Steps To Reproduce:

forge deploy site

forge-cli

Login Token problem

Forge CLI Version

1.0.8

PHP Version

8.2.7

Description

After put
forge login
later put TOKEN, give this error

An unexpected error occured. Please report this issue here:
https://github.com/laravel/forge-cli/issues/new/choose

Steps To Reproduce

forge login

TOKEN

Lack of Option to Disconnect Envoyer Projects in Laravel Forge

Forge CLI Version

1.8.0

PHP Version

8.1.26

Description

In the recent integration between Laravel Forge and Envoyer, I've encountered a significant limitation. Once a site is connected with Envoyer through Forge, there's no provided option in the user interface or the Laravel Forge API to disconnect that project from Envoyer.

Steps To Reproduce

Steps to Reproduce:

  1. Connect a project from Laravel Forge with Envoyer.
  2. Look for the option to disconnect the project from Envoyer within the Laravel Forge interface or through the API.
  3. Note the absence of any function or button to perform this action.

Expected Outcome:

An explicit option should be available to disconnect a project from Envoyer within the Laravel Forge interface or through its API. This functionality is crucial to provide a complete experience and allow for full management of the connection between these services.

Impact:

The lack of this option makes it difficult for users to handle connections between Forge and Envoyer in a complete and efficient manner. This missing functionality can be critical for projects needing adjustments in their integrations or temporary disconnections.

Additional Information:

This issue limits users' flexibility and control over their integrations between Laravel Forge and Envoyer. Adding a feature to disconnect projects would be beneficial for those needing to adjust their configurations or make changes in the connection between both platforms.

Passing null to parameter #1 ($string) of type string is deprecated

  • Forge CLI Version: 1.3.4
  • PHP Version: 8.1.2

Description:

I am experiencing an error when I try to view my site logs via the CLI.
I have authenticated properly, and the SSH is working too.
The error message I'm getting is strtolower(): Passing null to parameter #1 ($string) of type string is deprecated.

Steps To Reproduce:

Run the command to list site logs:
forge site:logs [my_site_name.com]

Intermittent SSH connectivity issues & command inconsistencies

  • Forge CLI Version: 1.4.0
  • PHP Version: 8.0.10

Description:

I'm getting a lot of intermittent SSH connectivity issues and some of the commands do not seem to be working properly, maybe as a result of the SSH issues.

SSH issues first:
I am following the Forge CLI docs and have made sure to configure my SSH keys, and I have verified that they are indeed on the server.

I run ssh:test once, which seems to work. But then I run the command 30 seconds later and it now claims I do not have SSH keys configured:
https://i.imgur.com/UWKRRPV.png
This has been happening for hours ever since I downloaded Forge CLI.

In addition, most of the commands are not working properly, I assume because of the connectivity issues:
https://i.imgur.com/Db8uYd7.png
This is one example, using the site:logs command, but the same inconsistencies can be seen with the 'site:deploy' command, basically anything that I imagine requires an SSH.

Steps To Reproduce:

Unfortunately I am not able to provide reproduceable steps as this seems to be some weird ephemeral bug that nobody else is able to really help with.

Store the server and site config in yml file like Vapor does

It would be amazing if there could be a single file like the vapor.yml for Forge (like a forge.yml) so you can have a single configuration file with all the settings that can even be copied to other sites. This would make Forge server managing so much easier and faster for us. Have you thought about this feature?

Not able to SSH into server after `forge ssh:configure`

  • Forge CLI Version: 1.3.3
  • PHP Version: 7.4.8
  • Git Bash on Windows 10 Pro in case it matters

Description:

Picking up from here, forge ssh:test and other ssh commands are resulting in:

Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?

Which I've already done for this server. I've reproduced this on two machines.

Steps To Reproduce:

  1. Globally install forge-cli
  2. Run forge login and add API key
  3. Run `forge ssh:configure [some-existing-server-slug], and name it some-existing-server-slug. See:
==> Creating Key [some_existing_server_slug.pub]
==> Adding Key [some_existing_server_slug.pub] With The Name [some-existing-server-slug] To Server [some-existing-server-slug]
==> SSH Key Based Secure Authentication Configured Successfully
  1. Run forge ssh some-existing-server-slug
  2. See:
Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?
  1. Run forge server:current. See you're in the context of the server you just configured SSH for
  2. Run forge ssh:test. See:
Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH Key?
  1. Log into Forge. See SSH key has been added to server.

I noted in the other issue that I wasn't clear how the system was deciding which SSH key to present and that some debugging was turning up Permission Denied errors, but it's been a while so I'm not 100% sure on any of that anymore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.