Earlier I ran apt update and upgrade as a root user and since then this issue is persisting
Running with gitlab-runner 12.3.0 (a8a019e0)
on test runner XXXXXXXX
Using Shell executor...
Running on IP-XX-XXX-XXX-XXX…
Fetching changes with git depth set to 50...
Initialized empty Git repository in /home/gitlab-runner/builds/XXXXXXXX/0/XXXXXXXX/XXXX-XXXX/.git/
Created fresh repository.
From http://XX-XXX-XXX-XXX/XXX/XXXX
* [new branch] master -> origin/master
Checking out 2dca3aec as master...
Skipping Git submodules setup
Checking the cache for default...
Runtime platform
arch=amd64 os=linux pid=6537 revision=a8a019e0 version=12.3.0
No URL provided, the cache will not be downloaded from the shared cache server. Instead, a local version of the cache will be extracted.
Successfully extracted cache
$ apt-get update -yqq
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
ERROR: Job failed: exit status 1
-yqq
? – user535733 Sep 28 '19 at 18:28