Open GonzaloCalandria opened 5 years ago
I don't use it on Windows. @mkovacek provided the Windows/cygwin instructions in the readme once. Does it still work for you with the latest repo 1.4?
@GonzaloCalandria in case you're still having this issue, I find that selecting individual files will throw this error. Selecting the folder containing the file won't
@GonzaloCalandria Let me know if you still have the problem with 1.4. Also we have a contribution with Powershell support coming in, maybe that fixes the issue.
@GonzaloCalandria this might simply be because IntelliJ passes a windows-style path to repo
, such as c:\some\dir
, while repo strictly expects unix-style paths, such as /some/dir
.
Could you try the same command manually, but with the backslashes converted to slashes?
@alexkli sorry to not answered this before.
I've tested using a cygwin path along with the file relative path like this
-l C:\RepoTool\repo\repo diff /cygdrive/c/demo-project/spa-demo/$/FileRelativePath$
And I got this error when I run diff
(I'm testing this with diff).
C:\cygwin64\bin\bash -l C:\RepoTool\repo\repo diff /cygdrive/c/demo-project/spa-demo/ui.apps/src/main/content/jcr_root/apps/spa_demo/components/card/_cq_dialog.xml
mktemp: failed to create directory via template ‘/cygdrive/c/Users/Public/Documents/Wondershare/CreatorTemp/repo.XXX’: No such file or directory
C:\RepoTool\repo\repo: line 354: cannot create temp file for here-document: No such file or directory
C:\RepoTool\repo\repo: line 334: cannot create temp file for here-document: No such file or directory
C:\RepoTool\repo\repo: line 341: cannot create temp file for here-document: No such file or directory
curl: (26) Failed to open/read local data from file/application
repo: failed to upload package:
Process finished with exit code 5
Ok... I make it work.. kind off...
but I've used Windows 10 bash instead of cygwin with a few changes.
Here's what I've changed:
Just FYI, this is for IntelliJ and for the diff
External Tool
Tool Settings
: C:\Windows\System32\bash.exe
Arguments
: /mnt/c/RepoTool/repo/repo diff /mnt/c/demo-project/spa-demo/$/FileRelativePath$
Where /mnt/c/RepoTool/repo/repo
is the full path to the repo tool file (I think here you can have the path added to $PATH$ in windows bash system) and /mnt/c/demo-project/spa-demo/
is the root path to my project that I had to hardcode to make it work.If there's some alternative to include the whole path (in Linux format with the proper slashes and path) would be great!
CC: @alexkli
@GonzaloCalandria
I have faced same issue, where path is appending incorrect in IntelIij. I have tried bash approach as above, but however i am facing below issue. Please let me know if you have faced below issue and any workaround for this issue.
uploading <Path of file in project>to http://localhost:4502 /mnt/c/Softwares/tools-repo-1.4/repo/repo: line 381: zip: command not found /mnt/c/Softwares/tools-repo-1.4/repo/repo: line 679: unzip: command not found curl: (3) Illegal characters found in URL repo: failed to upload package:
Thank you Karthik
@GonzaloCalandria
I have faced same issue, where path is appending incorrect in IntelIij. I have tried bash approach as above, but however i am facing below issue. Please let me know if you have faced below issue and any workaround for this issue.
uploading <Path of file in project>to http://localhost:4502 /mnt/c/Softwares/tools-repo-1.4/repo/repo: line 381: zip: command not found /mnt/c/Softwares/tools-repo-1.4/repo/repo: line 679: unzip: command not found curl: (3) Illegal characters found in URL repo: failed to upload package:
Thank you Karthik
I think your problem is that you don't have zip and unzip installed in bash. Maybe you can try installing those two commands?
@GonzaloCalandria
Thank you for your response, installing zip in bash has resolved this issue.
The only issue i have now is in Intellij when i try PUT i have this error curl: (3) Illegal characters found in URL repo: failed to upload package However, when i try PUT from bash console it is working fine.
Any suggestion for this issue
@GonzaloCalandria
Thank you for your response, installing zip in bash has resolved this issue.
The only issue i have now is in Intellij when i try PUT i have this error curl: (3) Illegal characters found in URL repo: failed to upload package However, when i try PUT from bash console it is working fine.
Any suggestion for this issue
I don't have any for that.. sorry. My only guess is that maybe you can try putting quotes between the path in the configuration of the repo tool?
@GonzaloCalandria thank you for your response
@GonzaloCalandria thank you for your response
Did it worked?
@GonzaloCalandria No, i am still checking on it
Hi All,
I have my local instance in port 4506. But if I configure .repo file under my parent project with the required details and running repo in IntelliJ in windows 10 is not taking the repository information with port 4506, it is trying for some time for 4502 and failing.
Configuring directly 4506 with required details in is working fine. From .repo it is not taking th eport details.
I made it work without hardcoding the root path by using -l repo diff -f "$UnixSeparators($FilePath$)$"
as the argument. UnixSeparators
converts the path from Windows format to Unix format.
Maybe the documentation for Windows should be updated with this.
@felipel1292 Could you please share a screenshot of the full configuration?
@felipel1292 Could you please share a screenshot of the full configuration?
Sure
Hello everyone, I'm trully sorry for not answering this before.
Having @felipel1292 's configuration, didn't worked for me.. it tries to perform the command against a path of the style c:/myproject/.....
and it says the file was not found.
I've tried using -l repo put -f "$UnixSeparators($FileRelativePath$)$"
(FileRelativePath
instead of FilePath
) and that seems to be working but now the problem I'm having is the following:
Just FYI.. my AEM instance is up and running (in port 4502)
@felipel1292 Does it still works for you? I changed it as you suggested but same result, I appeciate any updates from you.
repo: failed to upload package:
I am getting this after all configuration has been done.
Any idea??
It was resolved for me by removing the .exe extension from C:/cygwin64/bin/bash.exe and replacing it with C:\cygwin64\bin\bash. After that, ensure that Cygwin has the latest versions of packages zip, unzip, curl, and RSYNC installed. My issue was resolved after I tried this solution.
It was resolved for me by removing the .exe extension from C:/cygwin64/bin/bash.exe and replacing it with C:\cygwin64\bin\bash. After that, ensure that Cygwin has the latest versions of packages zip, unzip, curl, and RSYNC installed. My issue was resolved after I tried this solution.
This solves the issue. Confirmed with Windows, Cygwin and IntelliJ 2023 version
I'm trying to use repo with intellij but the path is wrong. This is what I have so far:
The output for one of the tasks is:
repo: not inside a vault checkout with a jcr_root base directory: /home/phoenix/C:\MyProject\packages\my-application\src\main\content\jcr_root\apps\myapp\components\authoring\hero\clientlibs\js.txt
I don't understand why is adding
/home/phoenix/
to the path.