/bin/rt tool returns nothing

Hello everyone, I’m trying to write some scripts that use the rt tool, but I have a problem with it returning nothing.

I made .rtrc file in my home directory, it seems to be authenticating the user correctly, but rt show ticket/x returns nothing, only thing that returns something is rt help and its options, rt ls returns no matches found(but there’s unresolved tickets in the database).

I’ve followed the instructions, but they all seem to just tell that you need the .rtrc or other conf file for RT to get credentials from and it should work.

Is there a problem with my config? Maybe the database? Server, user and passwd fields seem to be recognised as I do get errors if they’re wrong. What’s the difference between auth rt and basic?

RT version is 5.0.5, the server is hosted on localhost.

Hi,

It sounds like your .rtrc file is correctly set up for authentication, but the issue might be with how the tool is querying the database. Here are a few things to check:

  1. Permissions: Ensure that the user configured in your .rtrc file has the necessary permissions to view tickets.
  2. Configuration: Double-check that the server, user, and passwd fields in your .rtrc file match the database configuration exactly.
  3. Database Connection: Verify that RT can connect to your database. You can test this by running a direct query to see if it returns results.
  4. Command Syntax: Make sure the syntax for your rt commands is correct. For example, try rt tickets instead of rt show ticket/x to see if it lists any tickets.

The difference between auth rt and basic usually involves the authentication method—auth rt is RT-specific, while basic refers to standard HTTP basic authentication. Ensure you’re using the method compatible with your RT server’s configuration.

Hope this helps!