While committing I get the following errors - tortoisesvn

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

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.

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

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.

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

SVN export leads to E020024: Error resolving case

I've been having a very weird error using svn export. Calling this command from within a powershell script:
svn export svnFilePath \\abcd.aa.bb\aaa_b_c6$\abcdef\Abcdef\abcdef
which leads to
svn: E020024: Error resolving case of \\abcd.aa.bb\aaa_b_c6$\abcdef\Abcdef\abcdef
Now i've tried reversing the slashes like this
svn export svnFilePath //abcd.aa.bb/aaa_b_c6$/abcdef/Abcdef/abcdef
or using single quotation and double quotation marks but the end result is the same. I believe it has something to do with the server \\abcd.aa.bb\ because the same command works if it's used on another server \\xyz.aa.bb\. I don't have access to these Servers, as they're managed by someone else, to check for any differences unfortunately. Is there any way to fix this problem?
There is a chance that the error svn: E020024: Error resolving case of indicates that the network share is inaccessible by the user account under which you run svn export. I suggest double-checking access permissions configured on the network share and the UNC path you enter.

The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for

I use the TortoiseSVN to checkout source code from URL (browser) and get Error as follows :
Could not resolve hostname : The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for.
I have seen similar error being reported in this forum but wonder what was the exact solution to resolve the said error.
Among solutions proposed were :
'Everything was fixed by yet another reboot (2 reboots after TSVN update).'
posted Nikolay R
'The solution for me involved setting the appropriate proxy settings within Tortoise
SVN -> Settings -> Network (which were already setup in my browser, hence being able
to view the repository fine there). So if you are behind a proxy server, make sure
you setup TSVN appropriately'
posted by Chris
May I know what TSVN/network settings were changed to resolve this error?
Thank you.

Resources