If you push code to a git repo, you might get this error :
remote: error: insufficient permission for adding an object to repository database objects
remote: fatal: failed to write object
Make sure that the system permissions are set properly. Stackoverflow provides some good troubleshooting steps.
The commands below solve the issue :
chgrp -R groupname .
chmod -R g+rwX .
git config core.sharedRepository true
For groupname, make sure it matches the user account details that you use for logging in and pushing code to the git server.
gpasswd is the right tool for it.
For instance, let’s remove user user_name from secondary group group_name :
gpasswd -d user_name group_name
/usr/bin/ssh-copy-id: ERROR: No identities found
The error occurs when you want to copy your public key to a remote server using the utility ssh-copy-id
By default, the program looks for ~/.ssh/id_rsa.pub
If you have generated dsa keys, the location of your public file must be specified explicitely :
ssh-copy-id -i ~/.ssh/id_rsa.pub
Create an alias in your bashrc file such as :
alias cpid=’ssh-copy-id -i ~/.ssh/id_rsa.pub’
Reload your bashrc file to have this new alias available in your shell.
Using a netrc file in curl is useful to avoid typing your password for each new request.
The syntax of your netrc file is as follows :
If you log in using any LDAP-based authentication, make sure to add the DOMAIN.
Make sure to change the permissions on your netrc file :
chmod 600 netrc
By default, curl looks for a netrc file in your home directory.
If needed, you can manually mention the location of your netrc file :
curl --netrc-file mynetrc
Pip has an option for installing Python modules behind a proxy.
[fool@localhost:~]$ sudo pip --proxy http://your_proxy:3128 install pyvmomi
Bash variable http_proxy is not used by pip to access any configured proxy.
Here a few commands to check your Powershell version :
To lessen the information displayed :
You can use a cmdlet as well :
Get-Host | Select-Object Version
To make a Perl script portable is to avoid using system commands as much as possible. To deal with date formats actions, you’d better use DateTime or Date::Calc modules.
For a simple formatting of the current date using localtime() Perl function :
use POSIX qw(strftime);
my $date = strftime “%d-%m-%y”, localtime;
Instead of :
my $date = qx(date +%d-%m-%y);
Both work. The first one is more Perlish 😉
More info :
POSIX Function strftime() in Perl
DateTime Perl module
Date::Calc Perl module