GIT FTP returning 552 error code but there is plenty of storage - ftp

I have the following bitbucket YML file which is currently giving me a 552 FTP error code:
image: bitnami/git
​
pipelines:
branches: # Pipelines that run automatically on a commit to a branch can also be triggered manually
live:
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp push -u $FTP_USERNAME_LIVE -p $FTP_PASSWORD_LIVE $FTP_URL_LIVE
dev:
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp push -u $FTP_USERNAME -p $FTP_PASSWORD -v $FTP_URL
Please ignore the live branch as we haven't updated this yet. it's the dev branch i'm having issues with right now.
I've tried changing the FTP details, checking the storage available on the CPanel account etc and it still wont work and is giving this error. The FTP account is set to unlimited too. Does anyone have any suggestions how to get around this?

Related

How to bypass gitlab-runner asking for password for sudo commands or What is the default password for gitlab-runners

I am new to gitlab runners and trying to automate my project so that whenever a new tag is released, it should build a new deb package. PS: I am using mac and
following this official link by gitlab to get my task done
My first gitlab-ci.yml file was(which is just given there on the official link of gitlab I provided above):
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
# Defines stages which are to be executed
stages:
- build
# Stage "build"
run-build:
stage: build
script:
- apt-get install -y libncurses5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev zlib1g-dev libncursesw5-dev libbz2-dev
- autoreconf -fvi
- cp COPYING debian/copyright
- dpkg-buildpackage -us -uc
- mkdir build
- mv ../goaccess*.deb build/
# This stage is only executed for new tags
only:
- tags
# The files which are to be made available in GitLab
artifacts:
paths:
- build/*
The problem I initially getting with the above gitlab-ci.yml file was:
Output 1:
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/GJ7z2Aym/0/edge_release_management/.git/
Checking out 3d71402b as tag1-test...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:00
$ source /etc/profile
$ apt-get install -y libncurses5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev zlib1g-dev libncursesw5-dev libbz2-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
which says E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
So to resolve the above issue, I thought to change the brefore_script part with this
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
- echo "Hello, $GITLAB_USER_LOGIN!"
- echo "Hello, $GITLAB_USER_PASSWORD"
# - sudo rm /var/cache/apt/archives/lock
# - sudo rm /var/lib/dpkg/lock
- sudo su
Where I am trying to remove /var/cache/apt/archives/lock and /var/lib/dpkg/lock, as this is what I found on Google. When it didn't work, I tried sudo su. But with the above change, I started to get this issue.
Output 2:
Getting source from Git repository
00:00
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/GJ7z2Aym/0/edge_release_management/.git/
Checking out 7fbaaf4f as testing4...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:00
$ source /etc/profile
$ sudo rm /var/cache/apt/archives/lock
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
It says sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required
So, to resolve this, I used sudo -S su < $password_secret as shown:
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
- echo "Hello, $GITLAB_USER_LOGIN!"
- echo "Hello, $GITLAB_USER_PASSWORD"
# - sudo rm /var/cache/apt/archives/lock
# - sudo rm /var/lib/dpkg/lock
# - sudo su
- sudo -S su < $password_secret
Please note: I have saved $password_secret in Gitlab variables and it's value is $password.secret as someone on google said this can be it's value. I am not sure how true it is.
And now it is giving me this error:
Output 3:
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/GJ7z2Aym/0/edge_release_management/.git/
Checking out 0b8ab538 as 26...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:02
$ source /etc/profile
$ echo "Hello, $GITLAB_USER_LOGIN!"
Hello, user!
$ echo "Hello, $GITLAB_USER_PASSWORD"
Hello,
$ sudo -S su < $password_secret
[sudo] password for gitlab-runner: Sorry, try again.
[sudo] password for gitlab-runner:
sudo: no password was provided
sudo: 1 incorrect password attempt
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
Please note: I have also used the way which is mentioned here
But, I found that usermod is not there for macOS. So I tried using another way which is mentioned here using dscl. But it still showing me the Output 3 only
Now I am fed up and unable to think of any other possible ways to fix this. I think I have tried almost everything released to this issue(which might not be true at all, as there must be some solution for this, I believe). Can anyone please help me with this?
Summary: Basically my main problem is shown in the first output which says E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?. Rest everything I am doing is to resolve it only.

I asked this question but didn't get any answer for this. Can anyone answer this question? [duplicate]

I am new to gitlab runners and trying to automate my project so that whenever a new tag is released, it should build a new deb package. PS: I am using mac and
following this official link by gitlab to get my task done
My first gitlab-ci.yml file was(which is just given there on the official link of gitlab I provided above):
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
# Defines stages which are to be executed
stages:
- build
# Stage "build"
run-build:
stage: build
script:
- apt-get install -y libncurses5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev zlib1g-dev libncursesw5-dev libbz2-dev
- autoreconf -fvi
- cp COPYING debian/copyright
- dpkg-buildpackage -us -uc
- mkdir build
- mv ../goaccess*.deb build/
# This stage is only executed for new tags
only:
- tags
# The files which are to be made available in GitLab
artifacts:
paths:
- build/*
The problem I initially getting with the above gitlab-ci.yml file was:
Output 1:
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/GJ7z2Aym/0/edge_release_management/.git/
Checking out 3d71402b as tag1-test...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:00
$ source /etc/profile
$ apt-get install -y libncurses5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev zlib1g-dev libncursesw5-dev libbz2-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
which says E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
So to resolve the above issue, I thought to change the brefore_script part with this
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
- echo "Hello, $GITLAB_USER_LOGIN!"
- echo "Hello, $GITLAB_USER_PASSWORD"
# - sudo rm /var/cache/apt/archives/lock
# - sudo rm /var/lib/dpkg/lock
- sudo su
Where I am trying to remove /var/cache/apt/archives/lock and /var/lib/dpkg/lock, as this is what I found on Google. When it didn't work, I tried sudo su. But with the above change, I started to get this issue.
Output 2:
Getting source from Git repository
00:00
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/GJ7z2Aym/0/edge_release_management/.git/
Checking out 7fbaaf4f as testing4...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:00
$ source /etc/profile
$ sudo rm /var/cache/apt/archives/lock
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
It says sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required
So, to resolve this, I used sudo -S su < $password_secret as shown:
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
- echo "Hello, $GITLAB_USER_LOGIN!"
- echo "Hello, $GITLAB_USER_PASSWORD"
# - sudo rm /var/cache/apt/archives/lock
# - sudo rm /var/lib/dpkg/lock
# - sudo su
- sudo -S su < $password_secret
Please note: I have saved $password_secret in Gitlab variables and it's value is $password.secret as someone on google said this can be it's value. I am not sure how true it is.
And now it is giving me this error:
Output 3:
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/GJ7z2Aym/0/edge_release_management/.git/
Checking out 0b8ab538 as 26...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:02
$ source /etc/profile
$ echo "Hello, $GITLAB_USER_LOGIN!"
Hello, user!
$ echo "Hello, $GITLAB_USER_PASSWORD"
Hello,
$ sudo -S su < $password_secret
[sudo] password for gitlab-runner: Sorry, try again.
[sudo] password for gitlab-runner:
sudo: no password was provided
sudo: 1 incorrect password attempt
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
Please note: I have also used the way which is mentioned here
But, I found that usermod is not there for macOS. So I tried using another way which is mentioned here using dscl. But it still showing me the Output 3 only
Now I am fed up and unable to think of any other possible ways to fix this. I think I have tried almost everything released to this issue(which might not be true at all, as there must be some solution for this, I believe). Can anyone please help me with this?
Summary: Basically my main problem is shown in the first output which says E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?. Rest everything I am doing is to resolve it only.

How to run Jmeter Script in bitbucket Pipeline

Im quite new to bitbucket pipeline and i was looking into how to run my jmeter script in the pipeline without using Jenkins or bamboo. I have created a bitbucket-pipelines.yml file and got an issue "jmeter: command not found"
here is the script that i created.
pipelines:
branches:
master:
- step:
name: Jmeter
script:
- jmeter run Observability_Test.jmx
If jmeter command is not found you need to install JMeter prior to trying to launch the test.
Example configuration:
pipelines:
default:
- step:
script:
- apt-get update && apt-get install --no-install-recommends -y openjdk-11-jre wget
- cd /opt && wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.4.3.tgz && tar xf apache-jmeter-5.4.3.tgz
- cd apache-jmeter-5.4.3/bin && ./jmeter -n -t /path/to/Observability_Test.jmx
- cd apache-jmeter-5.4.3/bin && ./jmeter -n -t /path/to/Observability_Test.jmx
More information: Tips for scripting tasks with Bitbucket Pipelines

Running into Nektos/Act error permission denied when running actions locally

Pretty new to Nektos/act and in general running workflows locally and cant seem to find a solution to a permissions denied error when installing Node version 16. Here is the error I am running into when I run the following:
Command:
act -j release
Error:
docker exec cmd=[mkdir -p /var/run/act/actions/actions-setup-node#v1/] user= workdir=
mkdir: cannot create directory '/var/run/act/actions': Permission denied
Yaml (Example)
name: Release Example
on:
push:
branches: [ master ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout#v2
with:
token: ${{secrets.PRIVATE_SECRET}}
- name: Use version 16 of Node.js
uses: actions/setup-node#v1
with:
node-version: '16'
- name: Pre Install
run: echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}"> ~/.npmrc
- name: Install
run: npm ci
env:
PRIVATE_SECRET: ${{secrets.PRIVATE_SECRET}}
- name: Release
env:
GITHUB_TOKEN: ${{secrets.PRIVATE_SECRET}}
PRIVATE_SECRET: ${{secrets.PRIVATE_SECRET}}
REGISTRY_TOKEN: ${{secrets.PRIVATE_SECRET}}
run: npx semantic-release
What I have tried:
I have tried setting the user to root on the container for example
container:
image: ghcr.io/catthehacker/ubuntu:full-20.04
options: --user root
I have tried setting sudo in steps
- run: sudo chown runner:docker /var/run/docker.sockenter
I have tried passing the secrets via acts flags
I have tried setting the working directory and setting env auth override to true
I have checked issues related to this topic on the repo and it seems like others are facing the same issue but I have not been able to figure out a solution.
NOTE: This is all working on GitHub, but fails locally with the error mentioned above. Trying hard to test locally to not muddy up my repo with broken commits. Any help is greatly appreciated.
Appears to be a bug with the recent release. I confirm that downgrading to 0.2.24 fixed this issue.
https://github.com/nektos/act/issues/935#issuecomment-1035261208
brew remove act
cd $(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula
git checkout 3ab2604b1e630d4eccab40d0e78f29bd912a72b8 -- act.rb
brew install act
brew pin act
git checkout HEAD -- act.rb
act --version # make sure it's 0.2.24

How to integrate CD with CircleCI?

I've been following a lot of tutorials on CI using Python but the tutorials seem to stop there and rarely take the next step to CD. I'm a sole developer as well.
I've setup a project on Github that runs locally on my PC and is not a web app. I've connected it to CircleCI for CI. Here is my config.yml file.
version: 2
jobs:
build:
docker:
- image: circleci/python:3.7
working_directory: ~/repo
steps:
# Step 1: obtain repo from GitHub
- checkout
- run:
name: install dependencies
command: |
sudo apt-get update
pip install -r requirements.txt
- run:
name: run tests
command: |
python -m pytest -v
Everything runs great and I get an email from CircleCI alerting me the build failed when I make a push to master on github and one the of the pytests fail.
So my question, is what is the next step here? I have a few thoughts but am not sure on any of them honestly.
Create separate test and prod versions of the code. Automate updating the prod version when the test version builds with no errors. However, not sure what tools to use for this.
Push to project to Dockerhub. This seems redundant to me though, because Docker would run the same pytests that CircleCI is running. I'm not sure how this would even help with CD at this point.
Could someone please provide some guidance on next steps here?
Currently you have only one job build, so you can add more jobs under the jobs section. So what you want to do here is:
add test
build prod version
Push to Dockerhub
Please use config 2.1 to enable the workflows.
version: 2.1
jobs:
build:
docker:
- image: circleci/python:3.7
working_directory: ~/repo
steps:
# Step 1: obtain repo from GitHub
- checkout
- run:
name: install dependencies
command: |
sudo apt-get update
pip install -r requirements.txt
- run:
name: run tests
command: |
python -m pytest -v
test:
docker:
- image: circleci/python:3.7
steps:
- checkout
- run: echo "do your test here"
build-prod:
docker:
- image: circleci/python:3.7
steps:
- checkout
- run: echo "build your app"
push-to-dockerhub:
docker:
- image: circleci/python:3.7
steps:
- checkout
- setup_remote_docker # this is necessary to use docker daemon
- run: echo "do docker login and docker push here"
workflows:
build-and-push:
jobs:
- build
- test
requires:
- build
- build-prod
requires:
- test
- push-to-dockerhub
requires:
- build-prod
Please make sure we're using requires to run the job only when the required job is finished successfully.
Well definitely I've not tested the config on my end, but it's like above config. You have more configuration documents here - so please take a look for it to make it perfectly work.
https://circleci.com/docs/2.0/configuration-reference/

Resources