Category Archives: Linux

tar: Exiting with failure status due to previous errors

PROBLEM

When creating a compressed archive file:-

tar -zcvf apps.tar.gz apps

… the following error is thrown:-

tar: Exiting with failure status due to previous errors

SOLUTION

This error usually occurs due to permission issues.

However, the error messages are hidden beneath gobs of output activated by the verbose flag.

To fix this, reduce the output by removing the -v flag:-

tar -zcf apps.tar.gz apps

… and now, the error message appears:-

tar: apps/apps.key.enc: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors

Once the problem is fixed, the command will run successfully.

Advertisements

Git + Linux: (gnome-ssh-askpass:24871): Gtk-WARNING **: cannot open display:

PROBLEM

When running git clone on Linux, the following error appears:-

-bash-4.1$ git clone http://user@tfs:8080/tfs/my-institution/my-domain/_git/my-project
Initialized empty Git repository in /people/my-group/user/my-project/.git/

(gnome-ssh-askpass:24871): Gtk-WARNING **: cannot open display:

SOLUTION

To fix this, run the following command to disable gnome-ssh-askpass:-

-bash-4.1$ unset SSH_ASKPASS

Now, git clone will work just fine:-

-bash-4.1$ git clone http://user@tfs:8080/tfs/my-institution/my-domain/_git/my-project
Initialized empty Git repository in /people/my-group/user/my-project/.git/
Password:
remote:
remote:                    fTfs
remote:                  fSSSSSSSs
remote:                fSSSSSSSSSS
remote: TSSf         fSSSSSSSSSSSS
remote: SSSSSF     fSSSSSSST SSSSS
remote: SSfSSSSSsfSSSSSSSt   SSSSS
remote: SS  tSSSSSSSSSs      SSSSS
remote: SS   fSSSSSSST       SSSSS
remote: SS fSSSSSFSSSSSSf    SSSSS
remote: SSSSSST    FSSSSSSFt SSSSS
remote: SSSSt        FSSSSSSSSSSSS
remote:                FSSSSSSSSSS
remote:                  FSSSSSSs
remote:                    FSFs    (TM)
remote:
remote:  Microsoft (R) Visual Studio (R) Team Foundation Server
remote:
Receiving objects: 100% (504/504), 1.05 MiB, done.
Resolving deltas: 100% (138/138), done.

To prevent this from happening again, add unset SSH_ASKPASS command to .bashrc file.