プログラミング初心者です。
AtomでFTP接続しようとしています。
.ftpconfigを編集し、connectを押したところで以下のエラーメッセージが出ました。
■エラー
unexpected token U in JSON at position 241
privatekeyの一行だけ赤くハイライトされている
■試したこと
syntax errorは以下で解消できるという記事を見たので試しに以下やりましたが駄目でした
C:\Users\~~を
・C:/Users/~~(\を/に変更)
・C:\Users\~~(\を二個にする)
プライベートキーのパスが純粋に間違えていないか、ほかの入力データにミスがないかも確認したので大丈夫だと思います。
そもそもエラーの意味も理解できないのですが、何が問題なのでしょうか?
お力添えいただけますと幸いです。
もし他に情報記載必要でしたら追記いたします。
--追記--
{ "protocol": "sftp", "host": "xxx.xx.xxx.xx", "port": 22, "user": "xxxx", "pass": "", "promptForPass": false, "remote": "/home/xxx/xx", "local": "", "agent": "", "privatekey": "C:\Users\xxx\xxx\xxx", "passphrase": "", "hosthash": "", "ignorehost": true, "connTimeout": 10000, "keepalive": 10000, "keyboardInteractive": false, "keyboardInteractiveForPass": false, "remoteCommand": "", "remoteShell": "", "watch": [], "watchTimeout": 500 }
error message:
Could not parse .fpconfig
Unexpected token U in JSON at position 241
You should show the contents of your .ftpconfig file as it is.
Thank you for the advice, I added the contents.
I just changed the parts to xxx which could be a part of personal info.
Thank you. And your error message, please.
I am afraid you have tried two Yen marks to specify directory separator, but your .ftpconfig do not. This is importat.
I got error on the ones I wrote in the Q.
Just in case I changed it to two yens, but I got syntax error back.
Can you apply your input and output properly in your question, I mean reedit one please.
do you mean two yen ver.?
Yes, please. And I ask you another point, you have said in the question above that you got 'unexpected token ...' error, that is not syntax error. And you have commented you got syntax error. Those are the same or not? So more request. Could you show us the whole error messages ever you had?
for the code above, I got this error.
This is full message.
Could not parse .fpconfig
Unexpected token U in JSON at position 241
this is the syntax error:
Uncaught SyntaxError: Unexpected token u in JSON at position 0
Two errors? Which is what, where, when? Sorry I don't understand. I think everything should be (re)written on your question. I think there must be a mistake in the .ftpconfig description, especially the line of privatekey directive. Its value must have two yen marks for the directory separator. And the value must be the full path of your private key, like "C:\\foo\\bar\\mykey.ppk". The following site may help you: https://stackoverflow.com/questions/51152008/issue-connection-to-server-using-remote-ftp-atom-package-and-private-keys?rq=1
I am afraid you may be misunderstanding the ftp configuration file as .fpconfig instead of .ftpconfig?
(moved to the answer)
回答1件
あなたの回答
tips
プレビュー