# [SOLVED] Problem with passphrase prompting using gpg2

## archrax

Hi guys,

I'm trying to perform a symmetric encryption. 

```
$ gpg --output out.gpg --symmetric in.txt
```

I get the following error;

```
pinentry-curses: no LC_CTYPE known
```

After reading around, I put this in my .bashrc

```
export GPG_TTY='tty'
```

Then I got the following error;

```

gpg-agent[2556]: command get_passphrase failed: Operation cancelled

gpg: cancelled by user

gpg: error creating passphrase: Operation cancelled

gpg: symmetric encryption of `in.txt' failed: Operation cancelled

```

The problem seems to lie with prompting for a passphrase. I seem to get the same error when I try to decrypt an already encrypted document.

Any ideas?Last edited by archrax on Sun Jan 01, 2012 6:17 pm; edited 1 time in total

----------

## archrax

Hmm.

Changed .bashrc to

```

GPG_TTY=$(tty)

export GPG_TTY

```

Rebooted.

Works fine now, though I've not really changed anything.

Hate it when that happens.

----------

