The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,599 other followers

Archive for the ‘GitLab’ Category

git on Windows: prevent “The requested URL returned error: 403” during push of https based repository

Posted by jpluimers on 2019/01/10

When you search for git push "The requested URL returned error: 403", then the usual answer is “use ssh over https”, for instance at [WayBackgithub – Pushing to Git returning Error Code 403 fatal: HTTP request failed – Stack Overflow.

However, lots of places (especially larger corporations and financials) limit outgoing traffic to http and https based for (often perceived) security reasons.

In this case, I needed a solution for Windows, which – after a long search – found two solutions that are below.

I use the https://gitlab.com/wiert.me/examples/sql-examples.git repository as an example, but it isn’t limited to GitLab: the same symptoms happen with other hosters as well (for instance on GitHub and BitBucket):

First what doesn’t work: they all give the same 403 message.

  1. Installing a newer git version (I tried git version 2.13.3.windows.1)
  2. have the plain URL:
  3. put just the username or e-mail address in the URL
  4. put just the username or e-mail address in the URL with a blank password
  5. for the four above, add the caching credential helper then add a credential:

What could work

The first thing that works is to include the actual password in the repository URL like this:

When you enter the correct password, everything is fine. Except that the password is stored as plain text on disk.

What works

The real solution on Windows is to use the Windows Credential Manager. I found this because of the 5th failure above.

To see which username/password combinations have been stored or add your own, you can start the Credential Manager on the command-line like this (each Windows version seems to have a different path to the UI from the control panel; the console trick just works on all Windows versions I tested):

%windir%\explorer.exe shell:::{1206F5F1-0569-412C-8FEC-3204630DFB70}

Note the above was the reason for writing List of Shell GUIDs for various Windows versions for use in shortcuts and batch files.

What might work on non-Windows systems

I have the impression that the “cached” credential manager will work on non-Windows systems, but need to find some time testing that on multiple platforms. Stay tuned (:

For that I need to look into at least these:

–jeroen

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, GitLab, Source Code Management | Leave a Comment »

Reminder to self: make a list of URL suffixes to show branch diagrams of repositories

Posted by jpluimers on 2018/12/18

One of the BitBucket features I like a lot is that in the commit history, you see the branches involved in a nice diagram on the left side of the commits: https://bitbucket.org/pypy/pypy/commits

BitBucket used to be popular to host public repositories, but from a public perspective, they are on the decline for that (they even removed the [once popularbitbucket.org/explore page and [WayBack] will not re-introduce it).

Right now, only major git based hosters still have explore pages:

So it makes sense to see where they provide diagrams of branches, so here are some examples to go from a project to the graph:

–jeroen

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, GitLab, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »

git – How to store releases/binaries in GitLab? – Stack Overflow

Posted by jpluimers on 2018/12/12

[WayBack] git – How to store releases/binaries in GitLab? – Stack Overflow: yes you can, but on gitlab.com they are limited to a whopping 10 megabytes in size.

See:

–jeroen

Posted in Development, DVCS - Distributed Version Control, GitLab, Source Code Management | Leave a Comment »

[solved]Where is my user ID in GitLab.com? – HowTo – GitLab Community Forum

Posted by jpluimers on 2018/12/06

Try https://gitlab.com/api/v4/users?username=??? where ??? is your username. This will only work if you are already logged into gitlab.

Alternatively,

  1. go to https://gitlab.com/profile/account and copy your Private token.
  2. Then run the following command from a bash-like terminal:
    curl --header "PRIVATE-TOKEN: AAAA" https://gitlab.com/api/v4/users?username=BBBB
    where AAAA is your private token and BBBB is your username.

Source: [WayBack[solved]Where is my user ID in GitLab.com? – HowTo – GitLab Community Forum

Works:

  1. https://gitlab.com/users/sign_in
  2. https://gitlab.com/api/v4/users?username=wiert

Via the ID, you can find the issues assigned to the user:

–jeroen

Posted in Development, DVCS - Distributed Version Control, GitLab, Software Development, Source Code Management | Leave a Comment »

Some links that might help migrating from Mantis to GitLab

Posted by jpluimers on 2018/11/29

I might give a few of these a shot:

–jeroen

Posted in Development, DVCS - Distributed Version Control, GitLab, Software Development, Source Code Management | Leave a Comment »

 
%d bloggers like this: