# Why push cannot work?

**URL:** <https://drone.discourse.group/t/why-push-cannot-work/9396>\
**Category:** Drone Support\
**Created:** [April 2, 2021, 10:35am UTC](https://drone.discourse.group/t/why-push-cannot-work/9396 "2021-04-02T10:35:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icarus](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/icarus/32/3221_2.png) [@Icarus](https://drone.discourse.group/u/Icarus)\
**Post date:** [April 2, 2021, 10:35am UTC](https://drone.discourse.group/t/why-push-cannot-work/9396/1 "2021-04-02T10:35:55Z")

</div>

hello,  
I used Gitlab and drone.  
I just started using the Drone.  
I ran into two problems.

1. when I push, the drone cannot work. but the tag and merge request events works,  
Why is it happen? and how should I let push work?

2. when I trigger tag or merge request events.  
SCP-stage step show :  
`Error: can't connect without a private SSH key or password`  
but when I create a New Build manual, its works.

Thank you very much.

.drone.yml

```auto
    kind: pipeline
    name: default

    steps:
    - name: stage
      image: php:7.3
      commands:
      - php -v
      - php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
      - php composer-setup.php --install-dir=/usr/local/bin --filename=composer
      - chmod +x /usr/local/bin/composer
      - composer -V
      - rm -rf .git .drone.yml README.md composer-setup.php
      - ls -al
      when:
        branch:
        - develop
        - master
    - name: scp-stage
      image: appleboy/drone-scp
      settings:
        host: 127.0.0.1
        user: root
        port: 22
        password:
          from_secret: stage_125_password
        target: /home/www/ci-demo
        source: 
          - ./*
      when:
        branch:
        - develop
    - name: scp-live
      image: appleboy/drone-scp
      settings:
        host: 127.0.0.1
        user: root
        port: 22
        password:
          from_secret: stage_125_password
        target: /home/www/ci-demo-live
        source: 
          - ./*
      when:
        branch:
        - master
  

```

gitlab hooks:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/testdrone/original/2X/b/b3dbec327c8fd5dcbf5fe8072156a12a982db011.png)

---

<div class="post-metadata">

**Author:** ![csgitharness](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/csgitharness/32/904_2.png) [@csgitharness](https://drone.discourse.group/u/csgitharness)\
**Post date:** [April 15, 2021, 12:19pm UTC](https://drone.discourse.group/t/why-push-cannot-work/9396/2 "2021-04-15T12:19:49Z")

</div>

@Icarus ,

Could you please confirm below things:

1. Does push is enabled under webhook for the repository in gitlab that is being used here
2. Looks like you are using repository password stage\_125\_password, so could you please confirm if you have created on drone repo

Regard,  
Harness Support

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [April 15, 2021, 2:24pm UTC](https://drone.discourse.group/t/why-push-cannot-work/9396/3 "2021-04-15T14:24:01Z")

</div>

> [@\[Fixed\] Big repo, how to save the git clone time?](https://drone.discourse.group/t/fixed-big-repo-how-to-save-the-git-clone-time/8952/1):
>
> when I push, the drone cannot work.

We have a dedicated thread for this that you can use to triage. See [ENV: get source branch](http://discuss.harness.io/t/nothing-happens-when-i-push-code-no-builds-or-builds-stuck-in-pending/3424)

---

<div class="post-metadata">

**Author:** ![Icarus](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/icarus/32/3221_2.png) [@Icarus](https://drone.discourse.group/u/Icarus)\
**Post date:** [May 19, 2021, 8:36am UTC](https://drone.discourse.group/t/why-push-cannot-work/9396/4 "2021-05-19T08:36:17Z")

</div>

hello,  
sorry for the late reply  
about 1, If I create a new git repository, it works normally, I don’t know why that repository cannot work.  
about 2, it has an option when creating secrets Allow Pull Requests, so it cannot work.  
Thank you~
