The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
We use Atlassian.Stash - C# API wrapper for Atlassian Stash, version v4.0.30319
C# .Net 4.8, Windows 10/1909
We migrated from Bitbucket Server to Bitbucket org, and have the error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0
try
{
var client = new StashClient(ConfigParametres.GitBaseURL, username, password);
ResponseWrapper<Atlassian.Stash.Entities.Commit> allCommits = await client.Commits.Get("PROJECT_KEY", "REPOSITORY_NAME", null, null);
if (allCommits.Values == null)
{
return false;
}
}
catch (Exception ex)
{
return false;
}
I solve this issue by removing # and $ characters from my password.
Hi Mark,
Bitbucket Server aka Stash and Bitbucket cloud are 2 different products with 2 completely different REST APIs. Any client written to work with Bitbucket Server will not work as the URL paths will be completely different.
I would expect you will get a 404 not found HTML page as a response which cannot be parsed.
Here is the BBCloud REST API https://developer.atlassian.com/bitbucket/api/2/reference/
I'm not aware of a ready-to use client, but it may be out there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ulrich,
We used https://github.com/jlouros/StashApiCSharp
Do you know about BBCloud analogue? I mean C# library.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We switched to another library
https://github.com/lvermeulen/Bitbucket.Cloud.Net
But there is an error when calling GetRepositoryCommitsAsync()
Source "Flurl.Http"
Message "Response could not be deserialized to JSON: GET https://bitbucket.org/2.0/repositories/bxbts/smscore/commits"
InnerException
Source "Newtonsoft.Json"
StackTrace
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
at Flurl.Http.Configuration.NewtonsoftJsonSerializer.Deserialize[T](Stream stream)
at Flurl.Http.HttpResponseMessageExtensions.<ReceiveJson>d__0`1.MoveNext()
Message "Unexpected character encountered while parsing value: <. Path '', line 0, position 0."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.