Comments (26)
@SpellMender Great to hear it worked for you!
from ask-toolkit-for-vscode.
Excellent! @coolbigbear's solution worked for me! I didn't even have to revert back to a different version of VSCode!
From start to finish, here's the process for me to export a skill from the Amazon Developer Console to VSCode:
- From the Alexa Developer Console go to the "Code" tab
- Select "Offline Tools" on the toolbar above the code
- Select "Export to VSCode"
- You will be prompted to select a folder to load your project into. You don't have to create a new folder. A folder with the name of your project will be created for you. Then the project will fail with the error
Skill clone failed. Reason: Git folder setup failed
- Open a new Explorer window and navigate to
C:\Users\<your_user_name>\.ask\scripts\
- Both of these files need to be edited. Double-click and open with your favorite text editor (in my case it was Notepad++)
- Both of those files have a line beginning with
askRefreshToken=
.
askRefreshToken=$(tr -d '\n' < ${configFile} | tr -d ' ' | sed -n $configOp | sed 's/".*//')
You must add double quotes around ${ConfigFile}
for both files. Be sure to save your changes.
askRefreshToken=$(tr -d '\n' < "${configFile}" | tr -d ' ' | sed -n $configOp | sed 's/".*//')
- Now navigate back to VSCode and make sure to open the folder with your skill (if its not already opened) in your workspace.
- Open up a Terminal
- Type the command
git fetch
and press enter. Type the commandgit checkout dev
and press enter.
You will now see files populate in your workspace:
I figured if anyone on the internet is as visual a learner as I am, this should be helpful.
I'm hoping there is a quicker, easier resolution found soon.
EDIT: You should probably use git checkout master
and git checkout prod
as well. I used git checkout dev
in the example above because that seems to be the branch that is associated with the code you actually edit in the Alexa Developer Console.
from ask-toolkit-for-vscode.
Hi @tydonelson,
Thanks for the response. It has been really helpful, and I greatly appreciate it. I had an older version of Git, but the issue has now been resolved.
from ask-toolkit-for-vscode.
@khac , thanks for logging the bug. This seems to be similar to the bug #54 . We figured the issue is with respect to a bug in our clone skill functionality and fixed it through the PR #56 . However, that fix has not been released in the extension.
Sorry for the inconvenience. We will be working on releasing the patch soon.
In the mean time, to get around this, you can manually install the earlier version of the toolkit from the marketplace and try creating/downloading the skills. Once downloaded, for using the latest toolkit features you can upgrade it back to the latest version. We understand this is painful, is not the best developer experience and will try to address this through our next release ASAP.
from ask-toolkit-for-vscode.
@nikhilym, I installed an older version, v2.0.2
The error was the same when I tried to Create an Alexa-hosted skill, at the same time, I was able to see the skill being created on the Alexa developer console.
Skill creation failed. Reason: Git folder setup failed for /Users/a/Desktop/AlexaSkills/qwer123. Reason: Failed to execute git { "exitCode": 1, "gitCommand": "checkout", "stdout": "", "stderr": "error: pathspec 'prod' did not match any file(s) known to git\n" }
-
Could you mention how to sync VS Code with the
Amazon Developer Console - git
, so that command linegit
works -
One workaround is, to create the skill with ASK Toolkit then download the code from
Amazon Developer Console
from ask-toolkit-for-vscode.
Interesting. I was not able to reproduce this error. Can you please provide some more details about your toolkit configuration? Please run Alexa: About Alexa Skill Toolkit
command from command palette, and paste that information here. For context, here is my toolkit configuration :
OS: Darwin x64 19.6.0
Visual Studio Code Version: 1.51.1
Alexa Skills Toolkit Version: 2.1.0
Git Version: git version 2.29.2
Also, can you try downloading the skill and see if the issue persists? Is it happening for an existing skill as well or only for a new skill?
from ask-toolkit-for-vscode.
Any news on the update? I'm having the same problem.
from ask-toolkit-for-vscode.
@nikhilym here is what shows up when I run Alexa: About Alexa Skill Toolkit
from ask-toolkit-for-vscode.
@SpellMender @khac Thanks for reporting.
Are you able to run git fetch
, git checkout prod
and git checkout master
in the skill root directory using the command line?
Also, is it happening for an existing skill as well or only for a new skill??
from ask-toolkit-for-vscode.
@nikhilym @Chih-Ying
OS: Darwin x64 19.6.0
Visual Studio Code Version: 1.51.1
Alexa Skills Toolkit Version: 2.1.0
Git Version: git version 2.28.0
My git is connected to my github.com account, not the Alexa or AWS account, I was able to download the files from Amazon Developer Console
- Kindly let me know how to connect again to the git repository on the cloud to run the git commands.
from ask-toolkit-for-vscode.
Having the same issue.
OS: Windows_NT x64 10.0.19042 Visual Studio Code Version: 1.51.1 Alexa Skills Toolkit Version: 2.1.0 Git Version: git version 2.23.0.windows.1
Clicking on Download and edit skill
also does nothing.
Error:
Skill creation failed. Reason: Git folder setup failed for ...\AlexaSkills\test-test\test-test. Reason: Failed to execute git { "exitCode": 128, "gitErrorCode": "AuthenticationFailed", "gitCommand": "fetch", "stdout": "", "stderr": "...\.ask\\scripts\\git-credential-helper: line 11: ${configFile}: ambiguous redirect\n ...\.ask\\scripts\\git-credential-helper: line 11: ${configFile}: ambiguous redirect\nfatal: Authentication failed for 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/8b1aa862-0611-47fa-80bf-f6c054a0828c/'\n" }
I can execute git fetch
just fine
from ask-toolkit-for-vscode.
@nikhilym @Chih-Ying
OS: Darwin x64 19.6.0
Visual Studio Code Version: 1.51.1
Alexa Skills Toolkit Version: 2.1.0
Git Version: git version 2.28.0My git is connected to my github.com account, not the Alexa or AWS account, I was able to download the files from
Amazon Developer Console
- Kindly let me know how to connect again to the git repository on the cloud to run the git commands.
@khac The ASK Toolkit extension automatically initializes git and configures git credentials for users, so users can access the AWS CodeCommit repository that the hosted skill resides at. This git is using a different account from your personal git account.
More information you can look into FAQs:Why do I get a prompt for Git credentials when an Alexa hosted skill is created or downloaded?
Can you successfully run git fetch
, git checkout prod
and git checkout master
in the skill root folder without error messages? Can you share the error messages if any?
from ask-toolkit-for-vscode.
@khac @SpellMender @coolbigbear
We observed the Download and edit skill
does not work in the latest Visual Studio Code(version 1.51). We are currently investigating.
To unblock your work, please downgrade your Visual Studio Code to 1.50 <= , Please let us know if skill creation and downloading still do not work.
from ask-toolkit-for-vscode.
Downgrading to 1.49.3 does make Download and edit skill
button work.
However, it fails later with the same issue I mentioned (Skill creation failed. Reason: Git folder setup failed for
), git fetch
also did not work this time.
I managed to fix it by simply adding quotes around ${configFile}
inside the git-credential-helper
.
Specifically:
- Opened
git-credential-helper
in notepad. For me located inC:\Users\<user_name>\.ask\scripts
- Changed the
${configFile}
on this lineaskRefreshToken=$(tr -d '\n' < ${configFile} | tr -d ' ' | sed -n $configOp | sed 's/".*//')
to be surrounded by quotes i.e."${configFile}"
git fetch
worked fine in the directory now and usingDownload and edit skill
while on VSCode version = 1.49.3 works.
from ask-toolkit-for-vscode.
Downgrading to 1.49.3 does make
Download and edit skill
button work.
However, it fails later with the same issue I mentioned (Skill creation failed. Reason: Git folder setup failed for
),git fetch
also did not work this time.I managed to fix it by simply adding quotes around
${configFile}
inside thegit-credential-helper
.
Specifically:
- Opened
git-credential-helper
in notepad. For me located inC:\Users\<user_name>\.ask\scripts
- Changed the
${configFile}
on this lineaskRefreshToken=$(tr -d '\n' < ${configFile} | tr -d ' ' | sed -n $configOp | sed 's/".*//')
to be surrounded by quotes i.e."${configFile}"
git fetch
worked fine in the directory now and usingDownload and edit skill
while on VSCode version = 1.49.3 works.
Pushing updates failed due to the same error but in ask-pre-push
script inside the same directory.
Identical fix worked
from ask-toolkit-for-vscode.
When I run git checkout master
:
Also, it happens for both new and existing skills. As mentioned above, you can't use the ASK in VSCode to retrieve an existing skill, but you can do it from Alexa Developer Console via this menu:
The result is always the same though.
from ask-toolkit-for-vscode.
Downgrading to 1.49.3 does make
Download and edit skill
button work.
However, it fails later with the same issue I mentioned (Skill creation failed. Reason: Git folder setup failed for
),git fetch
also did not work this time.
I managed to fix it by simply adding quotes around${configFile}
inside thegit-credential-helper
.
Specifically:
- Opened
git-credential-helper
in notepad. For me located inC:\Users\<user_name>\.ask\scripts
- Changed the
${configFile}
on this lineaskRefreshToken=$(tr -d '\n' < ${configFile} | tr -d ' ' | sed -n $configOp | sed 's/".*//')
to be surrounded by quotes i.e."${configFile}"
git fetch
worked fine in the directory now and usingDownload and edit skill
while on VSCode version = 1.49.3 works.Pushing updates failed due to the same error but in
ask-pre-push
script inside the same directory.
Identical fix worked
@coolbigbear
Itβs nice to hear this solution works for you!
I was thinking about this solution as well, but I could not reproduce skill creation fail
on Windows
OS: Windows_NT x64 10.0.17763
Visual Studio Code Version: 1.51.1
Alexa Skills Toolkit Version: 2.1.0
Git Version: 2.23.0.windows.1
and Mac
OS: Darwin x64 18.7.0
Visual Studio Code Version: 1.51.0
Alexa Skills Toolkit Version: 2.1.0
Git Version: git version 2.28.0
@SpellMender
Thanks for your report.
Could you also try the solution @coolbigbear provided?
We will consider these environment settings into our test cases.
from ask-toolkit-for-vscode.
@Chih-Ying I've already attempted his solution. Unfortunately I can't find the .ask\script folder. In fact, my .ask folder is completely blank. I've tried to create a new skill via ASK, and I've tried to use a current skill. Same issue with both attempts. I will try to roll back the VSCode version to see if that helps, but I have my doubts. @coolbigbear if you have any suggestions to reproduce those results I'd love to hear them.
from ask-toolkit-for-vscode.
@SpellMender
According to your git fetch
error message above, I saw you have the file in C:\Users\<your_user_name>\.ask\scripts\git-credential-helper
.
The .ask
folder is not located at your skill project, but in your system at C:\Users\<your_user_name>\.ask
.
from ask-toolkit-for-vscode.
@SpellMender Looks like you have the exact same issue as me.
Look in your C:\Users\Michael Kellet\.ask\scripts
folder, should be located there
You'd also need to fix the ask-pre-push
script while you're in there to be able to push changes.
from ask-toolkit-for-vscode.
Thanks! Sorry for the confusion. I'll try that out and report back.
from ask-toolkit-for-vscode.
well, it seems to work for me when i use the Export to VS Code in Dev Console and that creates the directory and exports and open my skill WITHOUT errors. So i guess i will just stick with that. If i ever have to create a new skill i guess i will have to create it first in dev console then open it up in VS Code.
from ask-toolkit-for-vscode.
@Chih-Ying @nikhilym This morning I Exported from the developer console via my laptop on a fresh install of VSCode and everything worked without any errors! Perhaps the issue has been resolved! Please also make sure to resolve referenced issue #54 if you deem it solved.
from ask-toolkit-for-vscode.
@SpellMender @khac @coolbigbear @doctor-iksterog sorry for the late response and thanks for keeping this thread super active and updated on the progress. Special thanks to @coolbigbear & @SpellMender to debug and help us resolve the issue. As a small token of appreciation, we added your github user names in our Thank you
section in the toolkit updates view. Anyone can view the toolkit updates view again, in the extension, by running the Alexa: Show Toolkit Update notes
command in the vscode command palette.
@Chih-Ying fixed the scripts and released them recently. As @SpellMender observed, the recent extension release v2.2.0
should have these issues fixed.
If i ever have to create a new skill i guess i will have to create it first in dev console then open it up in VS Code.
@doctor-iksterog , we hope the latest extension release fixes this for you. The create skill
view from the extension should work flawlessly for you now. Sorry for the inconvenience.
I am going ahead and closing this and #54 issue. Please let us know if you are still facing problems. It would also be great if you can let us know of any feedback, feature requests or issues around the extension. Hope you are finding the extension useful π
from ask-toolkit-for-vscode.
I am getting this error while cloning the code from the Alexa Developer console on Ubuntu.
Skill clone failed. Reason: Command failed: git branch --show-current
Could anyone please let me what I have to do for fix this issue?
OS- Ubuntu
from ask-toolkit-for-vscode.
Hey @HimanshuPrimo , do you have git installed on your machine? Per the prerequisites here, the ASK VSCode extension requires at least version 2.27 of Git to be installed.
from ask-toolkit-for-vscode.
Related Issues (20)
- hello who are you HOT 2
- CyberAlex HOT 2
- Unable to receive events for Reminders/Skill enable or disable for Alexa Hosted Skill HOT 2
- Consistent Undefined Response for Alexa Simulator HOT 5
- GitHub repository problem using alexa in visual studio code HOT 8
- Error while trying to register a device for skill testing in VS Code HOT 3
- How to do shared development of an open source Alexa Skill on GitHub? HOT 1
- Not able to hook local simulator or ask-cli simulator to the local debugger HOT 5
- Closed issue 277 is still an issue HOT 1
- Add full support for Arabic locale (ar-SA)
- Various operations result in a Git error "No skill repository found"
- "There is no interaction model for en-US. Select a different locale." HOT 5
- duture
- local debugging of skills using persistent storage not working HOT 3
- Ability to pull and edit widget artifacts
- Support for download and editing of APLA documents. HOT 1
- Ability to download all of a skill's APL documents
- Error occurred while trying to debug Alexa Skill using ASK Toolkit in Python environment on VSCode HOT 9
- n
- Skill clone failed. Reason: Git folder setup failed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ask-toolkit-for-vscode.