[TortoiseSVN error]The XML response contains invalid XML and Malformed XML: no element found - tortoisesvn

Can not check out remote repository to my PC.
I have check the URL I have used,
It is like
https//219.101.XXX.XXX/svn/Projectnane/doc/branches/phasename/
and I guess there is nothing wrong with the auth problem.
Because I can use the TortoiseSVN repository broswer to view the URL above,
and all the subfolders are "well" displayed in the list pane of the repository browser.
But when I click on the subfolders in the repository broswer,
"TortoiseSVN error The XML response contains invalid XML and Malformed XML: no element found"
was displayed in the detail pane of repository broswer.
Same problem will happen when I directly check out the URL listed above,
and same error message is displayed.I guess I need some help.
Additional Info
a proxy server is used.
a vpn is running.
TortoiseSVN version:1.9.7
Unable to access the SVN server due to security problems.

Related

SVG image Download URL Link is not working in FFImageLoading in Xamarin Forms [duplicate]

What I want to do is to create a direct link URL to a mp3 file which is located on my Google Drive and use it on Audio object of HTML5, but I get 403 error.
I know that when one tries to create a link of a file located on Google Drive, it creates not a direct URL to the file but a URL for viewing the file through a viewer such as
https://drive.google.com/file/d/<file ID>/view?usp=sharing
I googled to find it is possible to rewrite it into a direct link URL like this:
https://drive.google.com/uc?id=<file ID>
I set this URL in the src property of my audio element. However, when I try play() method, the following error is thrown:
GET https://drive.google.com/uc?id=<file ID> 403
myProject.html:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
So I tried to access to the URL https://drive.google.com/uc?id=<file ID> from my browser.
Then, I got this:
403. That’s an error.
We're sorry, but you do not have access to this page. That’s all we know.
I tried many times so it is not likely that I'm mis-pasting the <file ID>.
What should I do to create a valid direct link URL of the file?
I would appreciate for any information.
Progress
I got what was wrong.
The problem was that a file on Google Drive can be accessed only from the user who is authorized, which means only the owner of the Google account can access the file URL.
I tried to access it from Chrome Browser which is associated with the Google account, then, the error didn't occur.
However, I want to serve this file to all the people.
What should I do to give permission for access to other people?
You understand that Google drive is not a file hosting service right? This solution is not going to be very stable even if you do get it to work.
For it to work your going to need to set the file public so that everyone can access it. Then i would be willing to bet you will need an API key to do this in the long run.
Also remember that file id is not stable it can change in the future if for example you upload the file.
I solved this on my own. I right clicked the file, clicked Get link, and changed the authorization selection from Restricted into Anyone with the link. Then, the 403 error vanished for the access from anyone.

Links to generated posts are all broken in Gitlab

When I am going through the linked documents it is saying 401 unauthorized. How to fix this issue?
It shows like this in the terminal:
"HTTP request sent, awaiting response ... 401 unauthorized"
These look like files uploaded to an issue, merge request, comment, etc. You are only able to access those files within the context of the issue, merge request, comment where they were originally posted. This is a security measure as you wouldn't want these files to be accessible to someone who wasn't a part of your project, or if the issue was confidential, etc. Instead you should either give the issue/merge request link to the person you wish to share with, or you should download the file and send through other means.

Is it possible to have a link to raw content of file in Azure DevOps

It's possible to generate a link to raw content of the file in GitHub, is it possible to do with VSTS/DevOps?
Even after reading the existing answers, I still struggled with this a bit, so I wanted to leave a bit more of a thorough response.
As others have said, the pattern is (query split onto separate lines for ease of reading):
https://dev.azure.com/{{organization}}/{{project}}/_apis/sourceProviders/{{providerName}}/filecontents
?repository={{repository}}
&path={{path}}
&commitOrBranch={{commitOrBranch}}
&api-version=5.0-preview.1
But how do you find the values for these variables? If you go into your Azure DevOps, choose Repos > Files from the left navigation, and select a particular file, your current url should look something like this:
https://dev.azure.com/{{organization}}/{{project}}/_git/{{repository}}?path=%2Fpackage.json
You should use those values for organization, project, and repository. For path, you'll see an HTTP encoded version of the unix file path. %2F is the HTTP encoding for /, so that path is actually just /package.json (a tool like Postman will do that encoding for you).
Commit or branch is pretty self explanatory; you either know what you want for this value or you should use master. I have "hard-coded" the api version in the above url because that's what the documentation currently points to.
For the last variable, you need providerName. In short, you should probably use TfsGit. I got this value from looking through the list of source providers and looking for one with a value of true for supportedCapabilities.queryFileContents.
However, if you just request this URL you'll get a "203 Non-Authoritative Information" response back because you still need to authenticate yourself. Referring again to the same documentation, it says to use Basic auth with any value for the username and a personal access token for the password. You can create a personal access token at https://dev.azure.com/{{organization}}/_usersSettings/tokens; ensure that it has the Token Administration - Read & Manage permission.
If you're unfamiliar with this sort of thing, again Postman is super helpful with getting these requests working before you get into the code.
So if you have a repository with a src directory at the root, and you're trying to get the file contents of src/package.json, your URL should look something like:
https://dev.azure.com/{{organization}}/{{project}}/_apis/sourceProviders/TfsGit/filecontents?repository={{repository}}&commitOrBranch=master&api-version={{api-version}}&path=src%2Fpackage.json
And don't forget the basic auth!
Sure, here's the rests call needed:
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/Feeds/{feedId}/packages/{packageId}?includeAllVersions={includeAllVersions}&includeUrls={includeUrls}&isListed={isListed}&isRelease={isRelease}&includeDeleted={includeDeleted}&includeDescription={includeDescription}&api-version=5.0-preview.1
https://learn.microsoft.com/en-us/rest/api/azure/devops/artifacts/artifact%20%20details/get%20package?view=azure-devops-rest-5.0#package
I was able to get the raw contents of a file using this URL.
GET https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/filecontents?serviceEndpointId={serviceEndpointId}&repository={repository}&commitOrBranch={commitOrBranch}&path={path}&api-version=5.0-preview.1
I got this from here.
https://learn.microsoft.com/en-us/rest/api/azure/devops/build/source%20providers/get%20file%20contents?view=azure-devops-rest-5.0
You can obtain the raw URL using chrome.
Turn on Developer tools and view the Network tab.
Navigate to view the required file in the DevOps portal (Content panel). Once the content view is visible check the network tab again and find the URL which starts with "Items?Path", this is json response which contains the required "url:" element.
Drag the filename from the attachments windows and drop it in to any other MS application to get the raw URL or linked filename.
Most answers address this well, but in context of a public repo with anonymous access the api is different. Here is the one that works in such a scenario:
https://dev.azure.com/{{your_user_name}}/{{project_name}}/_apis/git/repositories/{{repo_name_encoded}}/items?scopePath={{path_to_your_file}}&api-version=6.0
This is the exact equivalent of the "raw" url provided by Github.
Another way that may be helpful if you want to quickly get the raw URL for a specific file that you are browsing:
install the browser extension named "Undisposition"
from the dot menu (top right) choose "Download": the file will open in a new browser tab from which you can copy the URL
(edit: unfortunately this will only work for file types that the browser knows how to open, otherwise it will still offer to download it...)
I am fairly new to this and had an issue accessing a raw file in an Azure DevOps Repo. It's straightforward in Github.
I wanted to download a file in CMD and BASH using Curl.
First I browsed to the file contents in the browser make a note of the bold sections:
https://dev.azure.com/**myOrg**/_git/**myProjectName**?path=%2F**MyFileName.ps1**
I then constructed the URL similar to what #Zach posted above.
https://dev.azure.com/**myOrg**/**myProjectName**/_apis/sourceProviders/TfsGit/filecontents?repository=**myProjectName**&commitOrBranch=**master**&api-version=5.0-preview.1&path=%2F**MyFileName.ps1**
Now when I paste the above URL in the browser it displays the content in RAW form similar to GitHub.
The difference was I had to setup a PAT (Personal Access Token) in My Azure DevOps account then authenticate the URL in DOS/BASH example below:
curl -u "<username>:<password>" "https://dev.azure.com/myOrg/myProjectName/_apis/sourceProviders/TfsGit/filecontents?repository=myProjectName&commitOrBranch=master&api-version=5.0-preview.1&path=%2FMyFileName.ps1" -# -L -o MyFileName.ps1

Kentico: Issue related to the XML data Source, 403 error

I am getting the (403) Forbidden error in the Event Log of a Kentico website. The screenshot of the event log are shown below:
I have checked the Data Source web part used on the /home page and the URL from where i am getting XML data is also correct. So I am unable to understand what can be the cause of this type of error.
Any help will be greatly appreciated. Thanks in advance.
Is someone blocking Baiduspider from making requests to the XML file? There is a webRequest for XML url in place, for which default .net credentials from CredentialCache and user agent from current request is used. If the server or page with XML is blocking robots for example, this exception can occur.

While committing I get the following errors

When I try to commit, I get the following error. If any one faced this type of issue, please post workaround below.
Command: Commit Error: Commit failed (details follow): Error:
Server sent unexpected return value (403 Forbidden) in response to
MKACTIVITY Error: request for
'/svn/!svn/act/3b83fce9-ef52-f148-8f08-f84f900e99dd' Finished!:
This error means that your credentials do not have write access to the path you're attempting to commit to. Subversion's path-based authorization rules are case-sensitive, but not all OSes that Subversion runs on are.
On servers where read access has been enabled for all users, it's quite common with Windows servers for people to check out from a URL that matches the spelling of the path (and the path is then found), but not the case (so the path isn't found in the authorization file). As a result, you can check out, but not commit.
Example:
You have checked out from http://svn.mycompany.com/svn/Code/project1/TRUNK but the URL is actually http://svn.mycompany.com/svn/Code/Project1/trunk. The authorization rule specifies [Code:/Project1/trunk] and as a result, it can't be matched and your commit is rejected.
You need to talk to your server admin to see if the URL you've checked out from (visible in the Properties dialog for your working copy, or via svn info) matches what the server expects.
This problem is often about different permissions for different SVN
paths.
If you get
Commit failed (details follow): Server sent unexpected return value
(403 Forbidden) in response to MKACTIVITY request for
'/svn/reponame/your/path'
First, try to write to another SVN path on the server. If that is also
not possible, admin maybe needs to check IP based restrictions, or
LDAP-based restrictions.
In the case you cant write to that specific Dir,
it is very likely your user has no write permission for the path
/svn/your/path. I.e. path based permissions configuration issue.
Check:
1. Go to command line;
2. do svn ls svn://your.server/svn/reponame/your/path (the full URL of the path);
3. Enter credentials if needed. If you have no access, you user can’t even read the path
4. If you can list the path, user can read, but probably can’t write
Next thing is to contact the SVN Admin. And for Admin is to check the
svnaccess privileges
(See here
http://svnbook.red-bean.com/en/1.1/ch06s04.html#svn-ch-6-sect-4.4.2)
The reason you cannot read the path may be that the svnaccess file
which has restriction for your user or your group.
[reponame:/some/path] SomeuserOrGroup = r
Admin could probably test that by commenting out the line
AuthzSVNAccessFile /path/to/access/file
in httpd.conf
From: http://www.thinkplexx.com/blog/commit-failed-details-follow-server-sent-unexpected-return-value-403-forbidden-in-response-to-mkactivity-possible-reasons-what-to-do
If don't help you can look too:
http://www.kodkast.com/blogs/svn/server-sent-unexpected-return-value-403-forbidden-in-response-to-mkactivity-request
http://www.wandisco.com/svnforum/threads/37608-Server-sent-unexpected-return-value-%28403-Forbidden%29
svn: MKACTIVITY 403 Forbidden

Resources