Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login .netrc not found #146

Open
ccdanieldb opened this issue Aug 23, 2017 · 2 comments
Open

Login .netrc not found #146

ccdanieldb opened this issue Aug 23, 2017 · 2 comments

Comments

@ccdanieldb
Copy link

I think I have it all installed correctly but when I try to upload a file I get the below error. As you can see I am using the .netrc. I created the file with nano and have it in the proper format as per the intro start page.

machine jottacloud.com
login yourusername
password yourpassword

I am sure I am doing something wrong but I do not know what it is.

daniel@debian:~$ sudo jotta-scanner /home/daniel/Test /Jotta/Archive/Test
[sudo] password for daniel:
Traceback (most recent call last):
File "/usr/local/bin/jotta-scanner", line 11, in
sys.exit(scanner())
File "/usr/local/lib/python2.7/dist-packages/jottalib/cli.py", line 440, in scanner
jfs = JFS.JFS()
File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 954, in init
auth = get_auth_info()
File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 88, in get_auth_info
raise JFSError('Could not find username and password in either env or /.netrc, '
jottalib.JFS.JFSError: Could not find username and password in either env or /.netrc, you need to add one of these to use these tools
daniel@debian:
$ ls
Desktop Downloads jottalib Pictures Templates Videos
Documents jottacloudclient.log Music Public Test
daniel@debian:
$ cd ..
daniel@debian:/home$ ls
daniel jottacloudclient.log netrc
daniel@debian:/home$ nano jottacloudclient.log
daniel@debian:/home$ sudo nano .netrc
daniel@debian:/home$ sudo nano .netrc
daniel@debian:/home$ ls
daniel jottacloudclient.log netrc
daniel@debian:/home$ sudo jotta-scanner /home/daniel/Test /Jotta/Archive/Test
Traceback (most recent call last):
File "/usr/local/bin/jotta-scanner", line 11, in
sys.exit(scanner())
File "/usr/local/lib/python2.7/dist-packages/jottalib/cli.py", line 440, in scanner
jfs = JFS.JFS()
File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 954, in init
auth = get_auth_info()
File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 88, in get_auth_info
raise JFSError('Could not find username and password in either env or ~/.netrc, '
jottalib.JFS.JFSError: Could not find username and password in either env or ~/.netrc, you need to add one of these to use these tools
daniel@debian:/home$ ^C

@ghost
Copy link

ghost commented Nov 6, 2017

You should be able to run jotta-scanner as a normal user (without sudo). Currently it's looking for the .netrc file from /root/ instead of /home/daniel/ .

@Fjodor42
Copy link

Fjodor42 commented Nov 6, 2017

sudo might actually look in user *daniel's home folder, but as far as I can see, netrc (and not .netrc - notice the dot) is actually located in /home/, not in /home/daniel/ as it should be.

@rhoeden is absolutely correct that the user daniel should be able to run the commands, but as said, /home/netrc should be /home/daniel/.netrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants