Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Matching author with special character always fails #91

Open
0ge opened this issue Nov 19, 2018 · 7 comments
Open

Matching author with special character always fails #91

0ge opened this issue Nov 19, 2018 · 7 comments
Labels

Comments

@0ge
Copy link

0ge commented Nov 19, 2018

One in our team has Swedish letters in his name. When he tries to push he gets the following errors from SBCC:

remote: - Bitbucket: 'Hugo Sjöberg' != Commit: 'Hugo Sjöberg'
remote: 
remote: - Commit: 'Hugo Sjöberg'

We have the following (related) configuration:

Require Matching Author Name: yes
Require Userslug Matching Author Name: no
Require Author Name in Bitbucket: yes
Require Author Name As Userslug in Bitbucket: no
Require Matching Committer Name: yes
Require Userslug Matching Committer Name: no

I compared his gitconfig with mine and couldn't find anything amiss.

[user]
    name = Hugo Sjöberg
    email = [email protected]
@tomasbjerre
Copy link
Owner

I made a test and is getting expected output.

I would suspect that ö is configured with some different encoding. Perhaps copy/pasted from somewhere.

Here is my test:

✔ ~/workspace/rep_1 [master {origin/master} ↓·1↑·1|✔] 
18:09 $ GIT_COMMITTER_NAME="cTomas Björre" GIT_COMMITTER_EMAIL="[email protected]" git commit --amend --author="aTomas Björre <[email protected]>"
[master 2d3ffe2] asd
 Author: aTomas Björre <[email protected]>
 Date: Mon Nov 19 17:48:01 2018 +0100
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 hej
✔ ~/workspace/rep_1 [master {origin/master} ↓·1↑·1|✔] 
18:09 $ git push -f
Password for 'http://admin@localhost:7990': 
Räknar upp objekt: 4, klart.
Räknar objekt: 100% (4/4), klart.
Deltakomprimering använder upp till 4 trådar
Komprimerar objekt: 100% (2/2), klart.
Skriver objekt: 100% (3/3), 284 bytes | 284.00 KiB/s, klart.
Totalt 3 (delta 1), återanvände 0 (delta 0)
remote: At least one change is not ok
remote: refs/heads/master 2dd10ae821 -> 2d3ffe2ec1
remote: 
remote: 
remote: 2d3ffe2ec135aa9a5e53a6b685df85884a02b063 aTomas Björre <[email protected]>
remote: >>> asd
remote: 
remote: - Bitbucket: 'Tomas Björre' != Commit: 'aTomas Björre'
remote: 
remote: - Bitbucket: 'Tomas Björre' != Commit: 'cTomas Björre'
remote: 
remote: - Commit: 'aTomas Björre'
remote: 
remote: 
remote: Simple Bitbucket Commit Checker
remote: 
To http://localhost:7990/bitbucket/scm/project_1/rep_1.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: misslyckades sända vissa referenser till "http://admin@localhost:7990/bitbucket/scm/project_1/rep_1.git"

@0ge
Copy link
Author

0ge commented Dec 3, 2018

Not sure I understand your test - that would fail regardless?
How can I check the encoding used?

@tomasbjerre
Copy link
Owner

I should probably have included more in that comment... Don't remember exactly how I tested it now...

I'm not sure how to check the encoding of a name like that. Perhaps just re-enter it in the Bitbucket admin GUI.

@0ge
Copy link
Author

0ge commented Dec 3, 2018

And I should have gotten back faster. 😉

I opened his gitconfig file with Sublime Text and UTF-8 encoding and there it looks OK. If I open it with ISO 8859-1 (Latin-1) the special characters are wonky.
I re-entered his name in JIRA (synced with Bitbucket), but it didn't help.

@0ge
Copy link
Author

0ge commented Dec 3, 2018

I ran SHOW SERVER_ENCODING in the SQL database that holds our JIRA application and its also using UTF-8.

@tomasbjerre
Copy link
Owner

Perhaps this can be solved by adding logging. Logging each character ascii value.

@0ge
Copy link
Author

0ge commented Dec 3, 2018

I could try this, but not sure where or how to add the logging?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants