简体   繁体   中英

Is it possible to use https access to bitbucket rep with envoy in Laravel 5.7 app?

Is it possible to use https access to bitbucket rep with envoy in Laravel 5.7 app? Running envoy command I got error:

$ envoy run deploy
deployeruser@138.68.107.4's password:
[deployeruser@138.68.107.4]: Cloning into '20190309072721'...
[deployeruser@138.68.107.4]: remote: Repository client/project_name.git  not found
[deployeruser@138.68.107.4]: fatal: repository 'https://myaccount@bitbucket.org/client/project_name.git /var/www/html/project_name/release/20190309072721/' not found
[✗] This task did not complete successfully on one of your servers.

where https://myaccount@bitbucket.org is my account and client/project_name.git is the project I want to clone

I did not find such option at https://laravel.com/docs/5.7/envoy

If I run command in console:

git clone https://myaccount@bitbucket.org/client/project_name.git

on the target server(ubuntu 18 ubder Digital Ocean) it is cloned ok.

Modified: In my envoy file I have structure like:

@setup
    $server_login_user= 'deployer_user';
    ...
    # $repo= 'git clone git@bitbucket.org:myaccount/votes.git';
    $repo= 'git clone https://myaccount@bitbucket.org/myaccount/votes.git';

    $branch= '';


@endsetup

@servers(['production' => $server_login_user.'@NNN.NN.NN.NN'])


@task( 'clone', ['on'=>$on] )

    git clone {{ $branch }} "{{ $repo }} {{ $release_number }}"
@endtask

But running envoy in console I got error:

$ envoy run Deploy
deployer_user@NNN.NN.NN.N's password: 
[deployer_user@NNN.NN.NN.N]: Cloning into 'dest_directory'...
[deployer_user@NNN.NN.NN.N]: fatal: I don't handle protocol 'git clone https'
[✗] This task did not complete successfully on one of your servers.

The thing is that I ghave problems with ssh on my server and I would prefer to use http here, if that is possible...

Thanks!

Something is wrong with your git clone command. Try the following:

git clone https://myaccount@bitbucket.org/client/project_name.git

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM