I ran out of space on the partition the git-data folder was stored on, so I followed the steps in this link change the data directory gitlab to store repos elsewhere
However this didn't work, so I've moved the git-data folder back to /var/opt/gitlab/git-data and restored the gitlab.rb file configuration back to how it was before, and after reconfiguring gitlab and restarting it's still not working.
When I try to access a repository via the web interface, Gitlab simple tells me that the repository is empty.
I've also tried changing the permissions on the git-data folder to have git as the owner and group, and changing the permissions to 755.
Is someone able to advice a possible fix for this?
I've freed up space on the partition now so that is no longer an issue.
EDIT: After some reading I've set the following permissions, which hasn't resolved the issue;
# Holds repositories directory
sudo chown -R -v git:root /var/opt/gitlab/git-data
sudo chmod -R -v 0700 /var/opt/gitlab/git-data
# Holds git repositories
sudo chown -R -v git:git /var/opt/gitlab/git-data/repositories
sudo chmod -R -v 2770 /var/opt/gitlab/git-data/repositories
EDIT: I've logged into Gitlab and created a new repository, which has created fine and appears in the git-data/repositories folder, so I suspect that the permissions on the git-data folder are correct. However for some reason gitlab still thinks that the existing repositories are empty.
Thankfully I managed to resolve this.
Luckily Gitlab required an update so I ran 'yum update' and let all the necessary packages update. Once complete, I ran 'gitlab-ctl reconfigure' and finally 'gitlab-ctl restart' and everything now seems to be working again.
This would have probably fixed the problem:
gitlab-rake cache:clear RAILS_ENV=production
Related
I'm writing a CI workflow (GitHub actions), and it seems that eslint is failing with "Permission Denied" code 126. I can't seem to fix it.
Can someone explain why ESlint is failing with permission denied? If so, is there a solution?
Here's a link to the pr where it's failing.
If a GitHub action fails with Permission Denied there are two possibilities:
1. You are trying to run a command that requires elevated privileges
To solve this just prefix sudo. E.g. npx eslint > sudo npx eslint. The GitHub Docs specify:
The Linux and macOS virtual machines both run using passwordless sudo.
2. A shell script does not have the execute filesystem permission set
If you have a unix/bash shell handy, you can change that with:
chmod +x ./.github/scripts/xxx.sh
If not, you can tell git to add the permission with this command:
git update-index --chmod=+x ./.github/scripts/xxx.sh
update-index is similar to add in that it adds the change to the index, so you'll have to commit and push as usual.
I am trying to clone project from github
i tried
git clone https://github.com/modestkdr/scrumwala.git.
but when i got error
fatal: could not create work tree dir 'scrumwala.git.': Permission
denied
then i tried
sudo chown -R root /var/www
but same error exist.Any help would be appreciated
The git clone is done with your current (local Linux) account, not root.
So a sudo chown -R root would not change anything.
Check the rights associated with your current path, and make sure you (your current account) has the right to write in it.
You just insert the sudo command to run
sudo git clone https://github.com/modestkdr/scrumwala.git
if there's any problem, don't hesitate to notify me by way of a comment.
I'm trying to initialise my first MEAN project with command mean init myProject. This command returns the error :
There are 1313 files in your ~/.npm owned by root
Please change the permissions by running - chown -R whoami ~/.npm
By running this chown command I have another error Operation not permitted.
I tried to use nvm but I'm not sure if it's a good direction. If yes I have no idea how to configure it.
Could you please help me with that, I'm struggle with it since couple of days :/ Thanks
You need to run chown as root. Get your username using
whoami
Then run this replacing <username> with the one you got in the previous step
sudo chown -R <username> ~/.npm
For future reference, don't run "npm install -g" commands with sudo. If you're having permission problems, fix those first.
I had really serious problems with mean.io framework/scaffolding tool.
I know, that isn't solution for your problem but please be so kind to consider yeoman.
I recently set up a new VPS and have installed Git via yum and wget etc. All seemed well - I can add, commit, set up a remote and push to github.
However, when I try to pull from github:
user#domain.com [~]# git pull github master
git: 'pull' is not a git command. See 'git --help'.
Did you mean this?
shell
No, I didn't mean shell, I meant pull!
Now I've googled the heck outta this - including reading several posts on Stackoverflow:
"git pull" broken
git: 'pull' is not a git command. See 'git --help'
Although most posts seem to be about Mac issues (I'm on a CentOS server), it seems to be an issue with the git exec path, which is
user#domain.com [~]# git --exec-path
/usr/local/libexec/git-core
I've tried adding a various things to .bashrc with no success.
The key thing is that when I cd down to /usr/local/ and ls -l, I can't see a libexec directory.
But if I log in as root, I can cd to /usr/local/ and see libexec/, inside which is git-core. I can also git pull as root.
So - I suspect the problem is more to do with permissions and the server setup than git itself.
I've tried
sudo chmod a+rx /usr/local/libexec
But that did nowt too...
When I ssh into another server, as an account user, I can cd down to /usr/local and see libexec - so there's something wrong with this server setup.
Any ideas gratefully received.
Solved it now - the server is using jailshell... Disabling jailshell and using 'normal' shell works a treat
We have a repository running on subversion 1.6.6 on Ubuntu server. While adding a new file to the working copy and committing it to the repo, we get the error
Can't open file '/var/svn/mobilesync/db/txn-current-lock': Permission denied
What is the issue and what can I do about it ? Is it a matter of a lock created by a previous process instance that didn't get removed because of some error ?
Thank you,
UPDATE
Here were the commands that I used to create the repo
1) sudo svnadmin create myrepo
2) sudo chown www-data:www-data myrepo
I fixed this problem by changing the second command
sudo chown -R www-data:subversion myrepo
and then I was able to commit my files.
I faced this problem when i imported another repository into my own svn server. And the following command solved my issue:
$sudo chown -R www-data:www-data myrepo
fyi, you need to log in your svn server, check the permission of existed repositories, in my case it's www-data etc. and use 'chown' to change the owner and group of your repository in terms of owner setting of your other repositories.
-R is used as recursive option.
"myrepo" means the name of your repository.
i think "www-data" is used for apache server which is used inside my svn server.
Hope it helps.