question stringlengths 11 28.2k | answer stringlengths 26 27.7k | tag stringclasses 130
values | question_id int64 935 78.4M | score int64 10 5.49k |
|---|---|---|---|---|
def callback(ch, method, properties, body):
prop = properties
print prop
#print prop[1]
#print prop[“headers”]
#print prop.headers()
print body
This is the list from prop:
<BasicProperties(['delivery_mode=2', "headers={'BIProto.ClickEvent': 'BIProto.ClickEvent'}", 'conte... | Nevermind, all I had to do was print prop.headers
| RabbitMQ | 13,460,352 | 11 |
I'm using RabbitMQ as my message broker and my workers are Celery tasks. I'm trying to diagnose an issue where I'm enqueue tasks to RabbitMQ but Celery doesn't pick then up.
Is there a way I can check what tasks are enqueued in RabbitMQ? I'd like to see the date and time when they are enqueued, any ETA is specified, th... | You can use Flower to monitor tasks in real time.
https://github.com/mher/flower
Check out also rabbitmqclt command which inspects RabbitMQ server status:
http://www.rabbitmq.com/man/rabbitmqctl.1.man.html
rabbitmqctl list_queues
| RabbitMQ | 13,049,829 | 11 |
I am using Spring amqp 1.1 version as my java client.
I have a queue which has around 2000 messages. I want to have a service which checks this queue size and and if it is empty it will send out a message saying " All items processed".
I dont know how to get current queue size ? Please help
I googled and found a class... | So I know this is a little late and a solution has already been found but here is another way to look message counts in your queues
This solution assumes that you are using the spring rabbitmq framework and have defined your queues in your application config with the following tags defined
<rabbit:queue>
<rabbit:admin>... | RabbitMQ | 11,446,443 | 11 |
I have just installed RabbitMQ on my WindowsXP PC. I have fulfilled the Erlang OPC15 prereq as well.
My rabitmq seems to be working. I did a simple test using pika in python and it seems to work. The service is urnning.
The problem is that I cannot do anything with rabbitmqctl.bat. I always get the response:
Status of ... | Had the same problem, this instruction straight out of the manual installation guide solved my problem:
Synchronise Erlang Cookies (when running a manually installed Windows Service)
Erlang Security Cookies used by the service account and the user
running rabbitmqctl.bat must be synchronised for rabbitmqctl.bat to
func... | RabbitMQ | 9,250,364 | 11 |
I need to develop a realtime recent activity feed in django (with AJAX long-polling), and I'm wondering what's the best strategy for the server-side.
Pseudocode:
def recent_activity_post_save():
notify_view()
[in the view]
while not new_activity():
sleep(1)
return HttpResponse(new_activity())
The first thing ... | I would suggest keeping it simple...
Create a database table to store your events, insert into that table when appropriate, then just implement a simple ajax polling technique to hit the server every x seconds on the client side.
I have concerns with other solutions considering using a push-notification approach or usi... | RabbitMQ | 7,460,149 | 11 |
Our requirement is very simple. Send messages to users subscribed to a topic. We need our messaging system to be able to support millions of topics and maybe millions of subscribers to any given topic in near real time. Our application is built with Java.
We almost decided on RabbitMQ because of the community support, ... | RabbitMQ supports clustering and now has active/active High Availably queues allowing for greater scale out and availability options then possible with Redis out of the box.
RabbitMQ gives you a greater amount of control on everything from the users/permissions of exchanges/queues, to the durability of a specific exch... | RabbitMQ | 7,382,655 | 11 |
UDATE3: found the issue. See the answer below.
UPDATE2: It seems I might have been dealing with an automatic naming and relative imports problem by running the djcelery tutorial through the manage.py shell, see below. It is still not working for me, but now I get new log error messages. See below.
UPDATE: I added the l... | I found the solution to my problem from another stackoverflow post: Why does Celery work in Python shell, but not in my Django views? (import problem)
I had to add these lines to my settings file:
CELERY_RESULT_BACKEND = "amqp"
CELERY_IMPORTS = ("app.module.tasks", )
then in the task.py file I named the task as such:
... | RabbitMQ | 6,854,133 | 11 |
Is it possible with RabbitMQ and Python to do content-based routing?
The AMQP standard and RabbitMQ claims to support content-based routing, but are there any libraries for Python which support specifying content-based bindings etc.?
The library I am currently using (py-amqplib http://barryp.org/software/py-amqplib/) s... | The answer is "yes", but there's more to it... :)
Let's first agree on what content-based routing means. There are two possible meanings. Some people say that it is based on the header portion of a message. Others say it's based on the data portion of a message.
If we take the first definition, these are more or less t... | RabbitMQ | 3,280,676 | 11 |
What's the difference between SimpleMessageListenerContainer and DirectMessageListenerContainer in Spring AMQP? I checked both of their documentation pages, SimpleMessageListenerContainer has almost no explanation on inner workings, and DirectMessageListenerContainer has the following explanation:
The SimpleMessageLis... | The SMLC has a dedicated thread for each consumer (concurrency) which polls an internal queue. When a new message arrives for a consumer on the client thread, it is put in the internal queue and the consumer thread picks it up and invokes the listener. This was required with early versions of the client to provide mult... | RabbitMQ | 56,438,819 | 10 |
I'm trying to set up a subscription to a RabbitMQ queue and pass it a custom event handler.
So I have a class called RabbitMQClient which contains the following method:
public void Subscribe(string queueName, EventHandler<BasicDeliverEventArgs> receivedHandler)
{
using (var connection = factory.CreateConnection())
... | "Using" calls dispose on your connection and your event wont be triggered. Just remove your "using" block from the code so that it doesn't close the connection.
var connection = factory.CreateConnection();
var channel = connection.CreateModel();
channel.QueueDeclare(
queue: queueName,
durable: false,
excl... | RabbitMQ | 52,159,857 | 10 |
Apache Pulsar (by Yahoo) seems to be the next generation of Apache Kafka.
Apache RocketMQ (by Alibaba) seems to be the next generation of Apache ActiveMQ.
Both are open source distributed messaging and streaming data platforms.
But how do they compare? When should I prefer one over another in terms of features and perf... | Looks like you answer your own question.
To be fair, the main advantages of Pulsar against RocketMQ are:
Pulsar is oriented to topics and multi-topic.
RocketMQ is more interesting in batch and keeps the index of the messages.
RocketMQ you still need an adaptor to keep up with the backwards, Pulsar in the other hand com... | RabbitMQ | 50,826,968 | 10 |
We are working with celery at the last year, with ~15 workers, each one defined with concurrency between 1-4.
Recently we upgraded our celery from v3.1 to v4.1
Now we are having the following errors in each one of the workers logs, any ideas what can cause to such error?
2017-08-21 18:33:19,780 94794 ERROR Control c... | We are also having massive issues with celery... I spend 20% of my time just dancing around weird idle-hang/crash issues with our workers sigh
We had a similar case that was caused by a high concurrency combined with a high worker_prefetch_multiplier, as it turns out fetching thousands of tasks is a good way to frack ... | RabbitMQ | 45,803,728 | 10 |
I'm running a site using Django 10, RabbitMQ, and Celery 4 on CentOS 7.
My Celery Beat and Celery Worker instances are controlled by supervisor and I'm using the django celery database scheduler.
I've scheduled a cron style task using the cronsheduler in Django-admin.
When I start celery beat and worker instances the j... | i have changed the celery from 4.0 to 3.1.25, django to 1.9.11 and installed djcelery 3.1.17. Then test again, It's OK. So, maybe it's a bug.
| RabbitMQ | 40,579,804 | 10 |
We are using celery to make third party http calls. We have around 100+ of tasks which simply calls the third party HTTP API calls. Some tasks call the API's in bulk, for example half a million requests at 4 AM in morning, while some are continuous stream of API calls receiving requests almost once or twice per second.... | First of all - GIL - that should not be a case, since more machines should go faster. But - please check if load goes only on one core of the server...
I'm not sure if whole Celery is good idea in your case. That is great software, with a lot of functionality. But, if that is not needed, it is better to use something ... | RabbitMQ | 36,106,216 | 10 |
I've got a problem with connecting from Python code using pika to dockerized RabbitMQ.
I'm using this code to connect to the queue:
@retry(wait_exponential_multiplier=1000, wait_exponential_max=10000, stop_max_attempt_number=2)
def rabbit_connect():
connection_uri = cfg.get("System", "rabbit_uri", raw=True)
que... | You have mapped localhost:8080 to docker container's (new-rabbitmg) port 15672, which is actually port for the webui management. The port for amqp communication is 5672 or 5671.
| RabbitMQ | 35,773,789 | 10 |
We are in need of a queuing system in our Ruby On Rails 4 web application
what are the differences and why would/wouldn't you pick
Sidekiq over RabbitMQ?
| It's quite different things with different usage. Sidekiq is full-featured solution for job queueing and processing, while RabbitMQ is just a message broker where you can build your own stuff upon it.
| RabbitMQ | 34,525,941 | 10 |
Seems since spring-amqp version 1.5, there is a new annotation @queuebinding。But how to use it, i don't know if it can be used on a class or a method? Does it exist any example?
| Not sure what problem you have, but here is a sample exactly from the Reference Manual:
@Component
public class MyService {
@RabbitListener(bindings = @QueueBinding(
value = @Queue(value = "myQueue", durable = "true"),
exchange = @Exchange(value = "auto.exch"),
key = "orderRoutingKey")
)
... | RabbitMQ | 33,239,347 | 10 |
I was playing around the rabbitmq HTTP API and came across a weird scenario. When I look at my queues through the web interface, the status of both of them shows as IDLE. .
However when I use the HTTP API, the return for both the queue shows as 'running'. The code im using is below:
import requests
import json
uri = ... | Check the Management_console source code here: https://github.com/rabbitmq/rabbitmq-management/blob/master/priv/www/js/formatters.js#L479
function fmt_object_state(obj) {
if (obj.state == undefined) return '';
var colour = 'green';
var text = obj.state;
var explanation;
if (obj.idle_since !== und... | RabbitMQ | 31,038,064 | 10 |
I have 100 clients. Each client has unique username, password and two channels (users can't connect to different channels apart from their own). Should I create VirtualHost for each user?
How to write proper user permission to the below situation?:
my_user can connect only to vahost called user_vhost using username an... | Virutal host in RabbitMQ is more like a logical container where a user connected to a particular virtual host cannot access any resource (exchange, queue...) from another virtual host. I always think about it like a administrative domain kind of thing.
Based on what you have explained, I think having a virtual host per... | RabbitMQ | 28,253,641 | 10 |
When trying to install rabbitmq-server on RHEL:
[ec2-user@ip-172-31-34-1XX ~]$ sudo rpm -i rabbitmq-server-3.3.5-1.noarch.rpm
error: Failed dependencies:
erlang >= R13B-03 is needed by rabbitmq-server-3.3.5-1.noarch
[ec2-user@ip-172-31-34-1XX ~]$ rpm -i rabbitmq-server-3.3.5-1.noarch.rpm
error: Failed depen... | You need to install erlang via RPM for it to recognise the dependency.
The erlang RPMs are available in the EPEL repository:
https://www.rabbitmq.com/install-rpm.html
| RabbitMQ | 25,855,331 | 10 |
I am trying to setup rabbitmq it can be accessed externally (from non-localhost) through nginx.
nginx-rabbitmq.conf:
server {
listen 5672;
server_name x.x.x.x;
location / {
proxy_pass http://localhost:55672/;
}
}
rabbitmq.conf:
[
{rabbit,
[
{tcp_listeners, [{"127.0.0.1", 55672}]}
... | Since nginx 1.9 there is stream module for the tcp or udp (not compiled with by default).
I configured my nginx (1.13.3) with ssl stream
stream {
upstream rabbitmq_backend {
server rabbitmq.server:5672
}
server {
listen 5671 ssl;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
... | RabbitMQ | 23,399,604 | 10 |
As I understood AMQP 0.9.1, the main benefit was that you could send and receive messages and configure your exchanges / bindings / queues in a broker-independent way, thus you were able to switch your broker implementation without too much headache.
Now, AMQP 1.0 only defines a wire-level protocol, so you actually hav... | Unfortunately, your concerns are very valid.
Pieter Hintjens has great post on that, claiming that "AMQP/1.0 will go down in history as a prime documented example of how to fail a standardization effort and hurt a lot of people in the process."
To your question: "why would I favour a message broker that is AMQP complia... | RabbitMQ | 22,882,108 | 10 |
DefaultConsumer
My DemoConsumer inherits from DefaultConsumer.
I have noticed that working this way handleDelivery() is invoked from ThreadPool.
(printing Thread.currentThread().getName() I see pool-1-thread-1/2/3/4 eachtime.
I have also tested it several times and saw that the order is saved.
Just to make sure - sinc... | Yes,DefaultConsumer uses an internal thread pool that can be changed.
Using ExecutorService as:
ExecutorService es = Executors.newFixedThreadPool(20);
Connection conn = factory.newConnection(es);
Read http://www.rabbitmq.com/api-guide.html “Advanced Connection options”.
As you can read from the “QueueingConsumer” doc:... | RabbitMQ | 22,840,247 | 10 |
I have a simple publisher done in MassTransit. I’m sending the message in an interval and am able to receive it from .NET client using MassTransit. But when I try to observe something from Python, it is silent. Is there a way to consume MassTransit from Python or other languages? Examples appreciated.
Publisher:
builde... | It seems, that the easiest way is to bind the python queue to the exchange in RabbitMq management. After doing it I've sucessfully recieved the messages.
PyhonConsumer now looks the following way:
import pika
print('Stating consumer')
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
c... | RabbitMQ | 21,385,143 | 10 |
ActiveMQ / JMS has a built in-mechanism for ensuring that messages that share a common header (namely, the JMSXGroupID header) are always consumed by the same consumer of a queue when using a competing consumers pattern. The consumers of a queue are completely agnostic of the actual header values, as the guarantee of ... | As of the time this answer is written, this is not possible with AMQP alone and will require work on the application side of things. RabbitMQ plans on implementing something like this in the future, but it is not slated for release or development anytime soon.
References: https://github.com/rabbitmq/rabbitmq-server/is... | RabbitMQ | 20,530,591 | 10 |
I'm looking to know is it possible to move / merge messages from one queue to another.
For example:
main-queue contains messages ['cat-1','cat-2','cat-3','cat-4','dog-1','dog-2','cat-5']
dog-queue contains messages ['dog-1, dog-2, dog-3, dog-4]
So the question is, (assuming both queues are on the same cluster, vhost) ... | What you are/were looking for is the 'shovel' plugin. The shovel plugin comes built into the core but you have to explicitly enable it. It's really easy to use as it does everything for you (no manually consuming/republishing to another queue).
Enable shovel plugin via cli:
sudo rabbitmq-plugins enable rabbitmq_shovel
... | RabbitMQ | 17,075,116 | 10 |
Is there a way how can I send data to RabbitMQ from $.ajax?
My application is made up of several thousands web-clients (written on js) and WCF REST service and now I am trying to figure out how can I create a scalable point for my application. The idea is to have a rabbitmq instance which receives messages from js clie... | There are lots of 3rd-party HTTP plugins listed on RabbitMQ's developer tools page, and they also offer an experimental JSON-RPC plugin that allows for AMQP over HTTP access.
You should also take a look at RabbitJS and SockJS to see what the Rabbit team is doing to bring messaging to the worlds of node.js and WebSocket... | RabbitMQ | 10,080,718 | 10 |
I'm currently using Socket.IO with redis store.
And I'm using Room feature with it.
So I'm totally okay with Room join (subscribe)
and Leave (unsubscribe) with Socket.IO.
I just see this page
http://www.rabbitmq.com/blog/2010/11/12/rabbitmq-nodejs-rabbitjs/
And I have found that some people are using Socket.IO with rab... | SocketIO is a browser --> server transport mechanism whereas RabbitMQ is a server --> server message bus.
The two can be implemented together to create a very responsive system in scenarios where a user journey consists of a message starting life on a browser and ending up in, say, some persistence layer (such as a da... | RabbitMQ | 9,824,952 | 10 |
Is there a way to get the timestamp when a message was placed on the queue, from a consumer.
Not when it was published, but when it actually made it to the queue.
| No there's no way to figure this out, unless, as you state yourself you write a plugin for this. There is nothing in the AMQP specification that says that the message must know when it arrived in the queue.
There is no need from the AMQP point of view to know this. There are also many cases when the message might pass... | RabbitMQ | 9,216,712 | 10 |
I am using celery 2.4.1 with python 2.6, the rabbitmq backend, and django. I would like my task to be able to clean up properly if the worker shuts down. As far as I am aware you cannot supply a task destructor so I tried hooking into the worker_shutdown signal.
Note: AbortableTask only works with the database backend... | worker_shutdown is only sent by the MainProcess, not the child pool workers.
All worker_* signals except for worker_process_init, refer to the MainProcess.
However, the shutdown hook never gets called. Ctrl-C'ing the worker
doesn't kill the task and I have to manually kill it from the shell.
The worker never termin... | RabbitMQ | 8,138,642 | 10 |
In my models.py:
from django.db import models
from core import tasks
class Image(models.Model):
image = models.ImageField(upload_to='images/orig')
thumbnail = models.ImageField(upload_to='images/thumbnails', editable=False)
def save(self, *args, **kwargs):
super(Image, self).save(*args, **kwarg... |
1) Is what I'm trying to do considered a best practice? If yes, how do I work it out?
Yes, passing only a little information to the task is generally a good thing like you mentioned.
2) I have noticed in all the examples I found around the web, they execute the task from a view and never from a model. I'm trying to... | RabbitMQ | 8,107,085 | 10 |
I'm looking at the repos and there are so many projects, not sure which are wrappers/clients and which is the actual project.
Is it Erlang?
| Yes, it is Erlang. You can check this out by downloading the source for the server here:
http://www.rabbitmq.com/releases/rabbitmq-server/v2.3.1/
| RabbitMQ | 5,363,401 | 10 |
I want to have a task that will execute every 5 minutes, but it will wait for last execution to finish and then start to count this 5 minutes. (This way I can also be sure that there is only one task running) The easiest way I found is to run django application manage.py shell and run this:
while True:
result = tas... | Wow it's amazing how no one understands this person's question. They are asking not about running tasks periodically, but how to ensure that Celery does not run two instances of the same task simultaneously. I don't think there's a way to do this with Celery directly, but what you can do is have one of the tasks acquir... | RabbitMQ | 5,361,521 | 10 |
I am currently evaluating message queue systems and RabbitMq seems like a good candidate, so I'm digging a little more into it.
To give a little context I'm looking to have something like one exchange load balancing the message publishing to multiple queues. I don't want to replicate the messages, so a fanout exchange ... | Exchanges are generally stateless in the AMQP model, though there have been some recent experiments in stateful exchanges now that there's both a system for managing RabbitMQ plugins and for providing new experimental exchange types.
There's nothing that does quite what you want, I don't think, though I'm not completel... | RabbitMQ | 2,596,208 | 10 |
Once upon a time, there was a file in my project that I would now like to be able to get.
The problem is: I have no idea of when have I deleted it and on which path it was.
How can I locate the commits of this file when it existed?
| If you do not know the exact path you may use
git log --all --full-history -- "**/thefile.*"
If you know the path the file was at, you can do this:
git log --all --full-history -- <path-to-file>
This should show a list of commits in all branches which touched that file. Then, you can find the version of the file you ... | GitLab | 7,203,515 | 1,930 |
What is the difference between a Pull request and a Merge request?
In GitHub, it's a Pull Request while in GitLab, for example, it's a Merge Request. So, is there a difference between both of these?
| GitLab's "merge request" feature is equivalent to GitHub's "pull request" feature. Both are means of pulling changes from another branch or fork into your branch and merging the changes with your existing code. They are useful tools for code review and change management.
An article from GitLab discusses the difference... | GitLab | 22,199,432 | 833 |
I have a problem when I push my code to git while I have developer access in my project, but everything is okay when I have master access. Where is the problem come from? And how to fix it?
Error message:
error: You are not allowed to push code to protected branches on this project.
...
error: failed to push some refs... | there's no problem - everything works as expected.
In GitLab some branches can be protected. By default only Maintainer/Owner users can commit to protected branches (see permissions docs). master branch is protected by default - it forces developers to issue merge requests to be validated by project maintainers before ... | GitLab | 32,246,503 | 620 |
How to check which version of GitLab is installed on the server?
I am about version specified in GitLab changelog:
https://gitlab.com/gitlab-org/gitlab-foss/blob/master/CHANGELOG.md
For example: "6.5.0", "6.4.3", etc.
Сan this be done only through the terminal?
Is there a way to do that remotely (with browser instea... | I have updated my server to GitLab 6.6.4 and finally found the way to get version of GitLab remotely without SSH access to server.
You should be logged in to access the following page:
https://your.domain.name/help
It shows something similar to:
GitLab 6.6.4 42e34ae
GitLab is open source software to collaborate on cod... | GitLab | 21,068,773 | 401 |
I have created several repositories in GitLab. One of those was for testing purposes and has some commits and branches. I want to delete or remove this repository. How can I do this?
|
Go to the project page
Select "Settings"
Select the "General" section (you must be in the repository you want to delete it)
If you have enough rights, then at the bottom of the page will be a button for "Advanced settings" (i.e. project settings that may result in data loss) or "Remove project" (in newer GitLab versio... | GitLab | 24,032,232 | 387 |
Can one transfer repositories from GitLab to GitHub if the need be. If so, how exactly can I go about doing the same?
Also, are there any pitfalls in doing so or precautionary measures that I need to keep in mind before doing so given that I may decide to eventually move them to GitHub (as it has more features at the ... | You can transfer those (simply by adding a remote to a GitHub repo and pushing them)
create an empty repo on GitHub
git remote add github https://yourLogin@github.com/yourLogin/yourRepoName.git
git push --mirror github
The history will be the same.
But you will lose the access control (teams defined in GitLab with sp... | GitLab | 22,265,837 | 366 |
I have run gitlabhq rails server on virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and starts rails server executing command sudo -u git -H bundle exec rails s -e production. After that I created user, using admin tools and created... | GitLab by default marks master branch as protected (See part Protecting your code in https://about.gitlab.com/2014/11/26/keeping-your-code-protected/ why). If so in your case, then this can help:
Open your project > Settings > Repository and go to "Protected branches", find "master" branch into the list and click "Unp... | GitLab | 28,318,599 | 342 |
I accidentally pushed my local master to a branch called origin on gitlab and now it is the default. Is there a way to rename this branch or set a new master branch to master?
| Updated:
Prerequisites:
You have the Owner or Maintainer role in the project.
To update the default branch for an individual project:
On the left sidebar, select Search or go to find your project.
Select Settings > Repository.
Expand Branch defaults. For Default branch, select a new default branch.
Optional. Select ... | GitLab | 30,987,216 | 290 |
My problem is that I can't push or fetch from GitLab. However, I can clone (via HTTP or via SSH). I get this error when I try to push :
Permission denied (publickey) fatal : Could not read from remote repository
From all the threads I've looked, here is what I have done :
Set up an SSH key on my computer and added t... | I found this after searching a lot. It will work perfectly fine for me.
Go to "Git Bash" just like cmd. Right click and "Run as Administrator".
Type ssh-keygen
Press enter.
It will ask you to save the key to the specific directory.
Press enter. It will prompt you to type password or enter without password.
The public ... | GitLab | 40,427,498 | 289 |
I'm facing this error when I try to clone a repository from GitLab (GitLab 6.6.2 4ef8369):
remote: Counting objects: 66352, done.
remote: Compressing objects: 100% (10417/10417), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early... | It happens more often than not, I am on a slow internet connection and I have to clone a decently huge git repository. The most common issue is that the connection closes and the whole clone is cancelled.
Cloning into 'large-repository'...
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/... | GitLab | 38,618,885 | 254 |
I am learning GitLab CI/CD.
I installed GitLab and GitLab Runner from Officials. Whenever I run the pipeline during Maven build, the job gets stuck. I have a registered runner and it is available to my project, but jobs get stuck.
.gitlab-ci.yml
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: o... | The job is stuck because your runners have tags and your jobs don't. Follow these 4 steps to enable your runner to run without tags:
Or set tags to your jobs. For more info: Configuration of your jobs with .gitlab-ci.yml - Tags
| GitLab | 53,370,840 | 227 |
Suppose that I would like to implement a fix to a project of someone else. That project resides on GitHub.
I could create a fork on GitHub and implement the fix.
However, I would like to create my fork on GitLab rather than on GitHub.
Is that possible? How?
I have read this article:
https://about.gitlab.com/2016/12/01/... | If you just want to track changes, first make an empty repository in GitLab (or whatever else you may be using) and clone it to your computer.
Then add the GitHub project as the "upstream" remote with:
git remote add upstream https://github.com/user/repo
Now you can fetch and pull from the upstream should there be any... | GitLab | 50,973,048 | 203 |
In my GitLab repository, I have a group with 20 projects. I want to clone all projects at once. Is that possible?
| Update Dec. 2022, use glab repo clone
glab repo clone -g <group> -a=false -p --paginate
With:
-p, --preserve-namespace: Clone the repo in a subdirectory based on namespace
--paginate: Make additional HTTP requests to fetch all pages of projects before cloning. Respects --per-page
-a, --archived: Limit by archived sta... | GitLab | 29,099,456 | 202 |
I have an account of a Gitlab installation where I created the repository "ffki-startseite"
Now I want to clone the repository git://freifunk.in-kiel.de/ffki-startseite.git into that repository with all commits and branches, so I can start working on it in my own scope.
How can I import it?
| I was able to fully export my project along with all commits, branches and tags to gitlab via following commands run locally on my computer:
To illustrate my example, I will be using https://github.com/raveren/kint as the source repository that I want to import into gitlab. I created an empty project named Kint (under... | GitLab | 20,359,936 | 186 |
We are using GitLab for our private project. There are some forked libraries from github, that we want to install as npm module. Installing that module directly from npm is ok and for example this:
npm install git://github.com/FredyC/grunt-stylus-sprite.git
...works correctly too, but doing the same for GitLab, just c... | You have the following methods for connecting to a private gitlab repository
With SSH
git+ssh://git@git.mydomain.com:Username/Repository#{branch|tag}
git+ssh://git@git.mydomain.com/Username/Repository#{branch|tag}
With HTTPS
git+https://git@git.mydomain.com/Username/Repository#{branch|tag}
With HTTPS and deploy token... | GitLab | 22,988,876 | 158 |
I'm trying to add a ruby rails file to my repository in gitlab, but it doesn't allow me to add the file saying that my file does not have a commit checked out.
I've tried git pull, and making the the file again and git adding it, but it still doesn't work. This is the error message I get:
error: '172069/08_lab_routes_c... | If you have a subdirectory with a .git directory and try to git add . you will see this message.
This can happen if you have a git repo and then create/clone another repo in a subdirectory under that repo.
| GitLab | 56,873,278 | 155 |
We have recently started to use GitLab.
Currently using a "centralized" workflow.
We are considering moving to the github-flow but I want to make sure.
What are the pros and cons of git-flow vs github-flow?
| As discussed in GitMinutes episode 17, by Nicholas Zakas in his article on "GitHub workflows inside of a company":
Git-flow is a process for managing changes in Git that was created by Vincent Driessen and accompanied by some Git extensions for managing that flow.
The general idea behind git-flow is to have several... | GitLab | 18,188,492 | 152 |
I'm using GitLab to write a read.me file.
I tried to create a link to a header. According to the wiki an id should be automatically created:
see here
I created a header using:
### 1. This is my Header
and tried to create a link to it:
[link](#1--this-is-my-header)
but it is not working.
What am I doing wrong?
| In the Documentation you link to we learn that...
The IDs are generated from the content of the header according to the
following rules:
All text is converted to lowercase.
All non-word text (e.g., punctuation, HTML) is removed.
All spaces are converted to hyphens.
Two or more hyphens in a row are converted to one.... | GitLab | 51,221,730 | 150 |
I created a custom docker image and push it to docker hub but when I run it in CI/CD it gives me this error.
exec /usr/bin/sh: exec format error
Where :
Dockerfile
FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y python3-pip
RUN pip3 install robotframework
.... | The problem is that you built this image for arm64/v8 -- but your runner is using a different architecture.
If you run:
docker image inspect rethkevin/rf:v1
You will see this in the output:
...
"Architecture": "arm64",
"Variant": "v8",
"Os": "linux",
...
Try building and pushing your image fro... | GitLab | 73,285,601 | 150 |
What is the difference between Jenkins and other CI like GitLab CI, drone.io coming with the Git distribution. On some research I could only come up that GitLab community edition doesn't allow Jenkins to be added, but GitLab enterprise edition does. Are there any other significant differences?
| This is my experience:
At my work we manage our repositories with GitLab EE and we have a Jenkins server (1.6) running.
In the basis they do pretty much the same. They will run some scripts on a server/Docker image.
TL;DR;
Jenkins is easier to use/learn, but it has the risk to become a plugin hell
Jenkins has a GUI (t... | GitLab | 37,429,453 | 140 |
Question:
Is there a way to automatically checkout git submodules via the same method (ssh or https) as the main repository?
Background:
We have a non-public gitlab repository (main) that has a submodule (utils) which is also hosted as a non-public gitlab repository on the same server. Those repositories can be accesse... | I finally solved this problem by specifying the submodules url as a relative path:
So lets say your main git repository can be reached
either via https://gitlabserver.com/my/path/main.git
or via user@gitlabserver.com:my/path/main.git
And the .gitmodules file looks like this:
[submodule "utils"]
path = libs... | GitLab | 40,841,882 | 140 |
I use GitLab on their servers. I would like to download my latest built artifacts (build via GitLab CI) via the API like this:
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.com/api/v3/projects/1/builds/8/artifacts"
Where do I find this project ID? Or is this way of using the API not intended for ... | I just found out an even easier way to get the project id: just see the HTML content of the gitlab page hosting your project. There is an input with a field called project_id, e.g:
<input type="hidden" name="project_id" id="project_id" value="335" />
| GitLab | 39,559,689 | 137 |
I have one project on Gitlab and I worked with it for the last few days!
Now i want pull project on my home PC but show me below error :
Invocation failed Unexpected Response from Server: Unauthorized
java.lang.RuntimeException: Invocation failed Unexpected Response from Server: Unauthorized
at org.j... | Enabling credentials helper worked for me, using Android Studio 3.6.2 on Windows 10
AndroidStudio -> File -> Settings -> Git -> Use credential helper
| GitLab | 55,783,219 | 132 |
I had created a private repository which I then changed to public repository. However, I could not find any way to release. Is it possible to create releases in GitLab? If so, how are they done?
| To create a release on the GitLab website:
Go to your repository
In the menu choose Repository > Tags
Add a tag for the version of your app. For example, v1.3.1.
Add a message (title) about the release. For example, Release 1.3.1.
Add a note that describes the details of the release. (Not optional. Adding a note to a ... | GitLab | 29,520,905 | 127 |
I want to create a public repo to put some sample files from my main repo (private). Is there any way to soft link few folders from a git repo to another git repo?
| Then you should use submodules for this task.
Submodule are different git repositories under the same root.
This way you can manage 2 different project at folder level inside the root repository
Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a... | GitLab | 36,554,810 | 127 |
Today I've enabled Gitlab's 2nd-factor authentication. After that, since I logged in the Gitlab website, I need to use my cell phone to pass a 6-digits plus my password, that's good, it makes me feel safe.
However, when I use the general operations, for example git clone some-repo.git, I got the error:
Cloning into 'so... | As explained in using gitlab token to clone without authentication, you can clone a GitLab repo using your Personal Access Token like this:
git clone https://oauth2:ACCESS_TOKEN@gitlab.com/yourself/yourproject.git
As for how to update your existing clones to use the GitLab Personal Access Token, you should edit your .... | GitLab | 51,658,549 | 121 |
We have a project that is composed of multiple (non-public) repositories.
To build the whole project, the build system needs to have the files of all repositories (master branches).
Is there a way I can configure GitLab CI to provide the repositories I need?
I guess I could do a git fetch or similar during the CI buil... | If you are running GitLab version 8.12 or later, the permissions model was reworked. Along with this new permission model comes the CI environment variable CI_JOB_TOKEN. The premium version of GitLab uses this environment variable for triggers, but you can use it to clone repos.
dummy_stage:
script:
- git clone h... | GitLab | 32,995,578 | 116 |
I have stored a Markdown file and an image file in a Git repo as follows:
readme.markdown
images/
image.png
I reference the image from readme.markdown like this:

This renders as expected in ReText, but does not render when I push the repo to GitLab.
How can I reference the image from the Ma... |  without the ./ works for me: https://gitlab.com/cirosantilli/test/blob/bffbcc928282ede14dcb42768f10a7ef21a665f1/markdown.md#image
I have opened a request for this to be allowed at: http://feedback.gitlab.com/forums/176466-general/suggestions/6746307-support-markdown-image-path-in-current-directory... | GitLab | 27,016,052 | 115 |
I want to publish some programming documentation I have in a public available repository. This documentation has formatted text, some UML diagrams, and a lot of code examples. I think that GitHub or GitLab are good places to publish this.
To publish the UML diagrams, I would like to have some easy way to keep them upda... | Edit: Alternative with Proxy service
This way is significantly different and simpler than the answer below; it uses the PlantUML proxy service:
http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.github.com/plantuml/plantuml-server/master/src/main/webapp/resource/test2diagrams.txt
The GitHub markdown for t... | GitLab | 32,203,610 | 114 |
I formatted my Windows 7 laptop and in an attempt to have git setup working again, I installed git and source tree application.
I deleted the SSH Key from gitlab and regenerated the key using ssh-keygen. But when I try to add the SSH Key at gitlab, it throws the following exception :
Key is invalid
Fingerprint has alre... | In my case; the public key i was trying to add was already used with 'work' Gitlab account and i received the said error upon trying to use the same key with 'personal' Gitlab account.
Solution - Add another public key on the same machine and use that with 'personal' gitlab account (both on same machine).
navigate to .... | GitLab | 23,537,881 | 112 |
According to the official gitlab documentation, one way to enable docker build within ci pipelines, is to make use of the dind service (in terms of gitlab-ci services).
However, as it is always the case with ci jobs running on docker executors, the docker:latest image is also needed.
Could someone explain:
what is the... |
what is the difference between the docker:dind and the docker:latest images?
docker:latest contains everything necessary to connect to a docker daemon, i.e., to run docker build, docker run and such. It also contains the docker daemon but it's not started as its entrypoint.
docker:dind builds on docker:latest and st... | GitLab | 47,280,922 | 111 |
I have set up and we are running a default install of GitLab v6.0.1 (we're about to upgrade as well). It was a "Production" setup, following this guide precisely to the letter:
https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
Now, how do we safely change the URL of a working install?
Apparen... | GitLab Omnibus
For an Omnibus install, it is a little different.
The correct place in an Omnibus install is:
/etc/gitlab/gitlab.rb
external_url 'http://gitlab.example.com'
Finally, you'll need to execute sudo gitlab-ctl reconfigure and sudo gitlab-ctl restart so the changes apply.
I was making changes in the wron... | GitLab | 19,456,129 | 101 |
Is it possible to move a GitLab repository from one group to another in GitLab?
For example, I have https://gitlab.com/my-user/my-repo. I'd like to move it to https://gitlab.com/my-group/another-group/my-repo.
Ideally, I'd like to keep all the issues associated with it.
| Yes, you can move your GitLab project from one namespace to another.
Your project -> Settings -> General -> Advanced
Then, almost at the end of the list.
Transfer project
| GitLab | 54,758,093 | 98 |
I implemented the oauth2 web flow in order to get access_token from users of my app. With the access_token, I would like to do the following actions:
Get user informations
Create a repo for this user
Push code to this repo (using git push )
I already successfully get the user information(1) and create a repo(2... | You should do
git remote add origin https://<access-token-name>:<access-token>@gitlab.com/myuser/myrepo.git
Note that this stores the access token as plain text in the .git\config file. To avoid this you can use the git credential system, providing the access token name for "username" and the access token for "passwo... | GitLab | 42,074,414 | 96 |
In my CI pipeline I am generating an artifact public/graph.png that visualises some aspect of my code. In a later step I want to commit that to the repo from within the CI pipeline. Here's the pertinent part of .gitlab-ci.yml:
commit-graph:
stage: pages
script:
- git config user.email "cipipeline@example.com"
... | Nowadays there is a much cleaner way to solve this without using SSH but using a project scoped access token, also see this answer.
In the GitLab project create an project scoped access token so it is linked to the project, not to an individual. Next store this token as an GitLab CI/CD variable. You can now connect usi... | GitLab | 51,716,044 | 95 |
Following this tutorial [link] to install gitlab on a dedicated server. I need to :
sudo -u git -H bundle install --deployment --without development test postgres aws
But an error occurred while installing rugged :
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ru... | For OSX if you're using homebrew:
brew install cmake
bundle install
| GitLab | 27,472,234 | 93 |
I've been following this guide on configuring GitLab continuous integration with Jenkins.
As part of the process, it is necessary to set the refspec as follows: +refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
Why this is necessary is not explained in the post, so I b... | A refspec tells git how to map references from a remote to the local repo.
The value you listed was +refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*; so let's break that down.
You have two patterns with a space between them; this just means you're giving multiple rule... | GitLab | 44,333,437 | 93 |
I have a private repository in GitLab. I have to give its access to members of my team. How can I do that using GitLab web-interface?
I know, how to do this in GitHub, but in GitLab it's somehow different.
| Update 2021: This answer is out of date, scroll down for the 2021 info.
UPDATE: Gitlab has changed a bit in 2 years, so here is the updated flow.
Click on the project that you want to share.
Click on the Settings tab (the gear icon on the left).
Click on the Members subtab.
Add member, and find the user if it exists o... | GitLab | 31,908,222 | 92 |
How can I change the project owner in GitLab?
There are options in project settings, but in the "transfer" field, it does not recognize any username or anything. Is it possible to change the owner-permissions and root-privileges?
| TL;DR
Move your project to a new group where both you and the other user are owners, then the other user must transfer it to his own namespace.
Background
The other answers obviously do not work to transfer a project to a different user, although the comments section of one is enough for someone to figure it out. Also ... | GitLab | 21,579,693 | 90 |
While working on a project using GitHub I've fallen in love with GitHub for Windows as a client. Now a new project beckons where I'll be using GitLab instead of GitHub.
Will I still be able to use GitHub for Windows as a client for GitLab? After all, they're both based on git, right? If not, what clients are available ... | Yes, you can use the Windows GitHub client and the GitHub Desktop client with GitLab, BitBucket or any other hosted Git solution.
We only use it with HTTPS and you'll need a valid certificate if you do use HTTPS. It may work with HTTP as well. We never did get SSH to work completely right since it's a tough to inject ... | GitLab | 22,639,815 | 89 |
I am building a workflow with Gitlab, Jenkins and - probably - Nexus (I need an artifact storage). I would like to have GitLab to store releases/binaries - is it possible in a convenient way?
I would not like to have another service from which a release (and documentation) could be downloaded but to have it somehow int... | Update Oct. 2020:
GitLab 13.5 now offers:
Attach binary assets to Releases
If you aren’t currently using GitLab for your releases because you can’t attach binaries to releases, your workflow just got a lot simpler.
You now have the ability to attach binaries to a release tag from the gitlab.ci-yml. This extends suppor... | GitLab | 29,013,457 | 85 |
Just started out using self hosted GitLab... it looks like it's going to be really useful moving towards a DevOps workflow.
Anyway, after migrating about 20 local Git repositories to the new GitLab server, neatly arranged into 4 groups. I then noticed you can actually have sub-groups within the groups. This would help ... | Turns out the "slug" for a project... the part of the URL after the GitLab server domain name is made up of the "namespace" and the project name. The name space is the group/subgroup path, so I was looking to transfer project to new namespace.
So for example if the group is "important-group" and project is called "proj... | GitLab | 52,778,548 | 84 |
We are working on integrating GitLab (enterprise edition) in our tooling, but one thing that is still on our wishlist is to create a merge request in GitLab via a command line (or batchfile or similar, for that matter). We would like to integrate this in our tooling. Searching here and on the web lead me to believe tha... | As of GitLab 11.10, if you're using git 2.10 or newer, you can automatically create a merge request from the command line like this:
git push -o merge_request.create
More information can be found in the docs.
| GitLab | 37,410,262 | 82 |
When you work on your .gitlab-ci.yml for a big project, for example having a time consuming testing stage causes a lot of delay. Is there an easy way to disable that stage, as just removing it from the stages definition, will make the YAML invalid from Gitlab's point of view (since there's a defined but unused stage), ... | You could disable all the jobs from your stage using this trick of starting the job name with a dot ('.'). See https://docs.gitlab.com/ee/ci/jobs/index.html#hide-jobs for more details.
.hidden_job:
script:
- run test
| GitLab | 64,992,049 | 82 |
How can I delete a commit that I made on GitLab? This commit that I made is not the HEAD now.
If I can't delete it, can I edit?
When it was the HEAD, I tried:
git reset --soft HEAD
git reset --soft HEAD^1
git revert HEAD
git rebase -i HEAD
git rebase -i HEAD~1
git reset --hard HEAD
git reset --hard Id-Code
I... |
git reset --hard CommitId
git push -f origin master
1st command will rest your head to commitid and 2nd command will delete all commit after that commit id on master branch.
Note: Don't forget to add -f in push otherwise it will be rejected.
| GitLab | 40,245,767 | 80 |
I have GitLab repository there and I need to test every merge request locally, before merging to the target branch.
How can I pull/fetch merge request as a new branch?
|
Pull merge request to new branch
git fetch origin merge-requests/REQUESTID/head:BRANCHNAME
i.e
git fetch origin merge-requests/10/head:file_upload
Checkout to newly created branch
git checkout BRANCHNAME
i.e (git checkout file_upload)
OR with single command
git fetch origin merge-requests/REQUESTID/head:BRANCHNAME... | GitLab | 44,992,512 | 77 |
I would like to run specific jobs on the .gitlab-ci.yaml if and only if files within specific directories of the repository have changed. Is there a way to do this with gilab's ci/cd tooling or would it be easier just to run a custom build script?
| Changes policy introduced in GitLab 11.4.
For example:
docker build:
script: docker build -t my-image:$CI_COMMIT_REF_SLUG .
only:
changes:
- Dockerfile
- docker/scripts/*
- dockerfiles/**/*
- more_scripts/*.{rb,py,sh}
In the scenario above, if you are pushing multiple commits to GitLab ... | GitLab | 51,661,076 | 77 |
I am trying to take a git clone from a particular branch of my bitbucket repository using the below command:
git clone <url> --branch <branchname>.
However, I am getting the below error while taking the clone:
error:unable to create file foldername/nodemodules/......: Filename
too long.
I tried resolving this by ru... |
Start Git Bash as Administrator
Run command git config --system core.longpaths true
Another way (only for this clone):
git clone -c core.longpaths=true <repo-url>
| GitLab | 52,699,177 | 77 |
I've read documentation, some articles and you might call me dumb, but this is my first time working with a concept like this.
I've registered runner with tag "testing"
created tag "testing" in gitlab
binded this runner, with particular project
I've also added the same tag e.g. "testing"in my local repo.
BUT how e... | Tags for GitLab CI and tags for Git are two different concepts.
When you write your .gitlab-ci.yml, you can specify some jobs with the tag testing. If a runner with this tag associated is available, it will pickup the job.
In Git, within your repository, tags are used to mark a specific commit. It is often used to ta... | GitLab | 43,638,979 | 72 |
I have GitLab & GitLab CI set up to host and test some of my private repos. For my composer modules under this system, I have Satis set up to resolve my private packages.
Obviously these private packages require an ssh key to clone them, and I have this working in the terminal - I can run composer install and get these... | See also other solutions:
git submodule permission (see Marco A.'s answer)
job token and override repo in git config (see a544jh's answer)
Here a full howto with SSH keys:
General Design
generating a pair of SSH keys
adding the private one as a secure environment variable of your project
making the private one avai... | GitLab | 25,689,231 | 71 |
I have a directory that i want to turn into a git project.
I created a new project in gitlab and then i did the following:
git init
git remote add origin git@gitlab.com:a/b/c.git
git add .
git commit -m "Initial commit"
git push -u origin master
In addition, I created the following .gitignore file:
*
!*/scripts
!*/job... | This is linked to issue 27456 and merge request 6608:
document the need to be owner or have the master permission level for the initial push
So it might be a permission level, not a branch issue.
See commit 81ee443:
You will need to be owner or have the master permission level for the initial push, as the master br... | GitLab | 52,026,119 | 71 |
Recently, I have created newbranch and created a merge request to Master branch. Before TeamLead accept merge request into Master branch another team member was committed another fix to the same branch(newbranch). After that I committed my local changes and pulled the changes in newbranch to local branch. And I pushed ... | Starting on your newBranch:
git checkout master to get back on the master branch
git pull origin master to get the most up-to-date version of the master branch
git checkout newBranch to get back on your newBranch
git rebase origin/master -i to perform an interactive rebase. The command will take you through and let you... | GitLab | 53,066,369 | 71 |
I have a job in my pipeline that has a script with two very important steps:
mvn test to run JUnit tests against my code
junit2html to convert the XML result of the tests to a HTML format (only possible way to see the results as my pipelines aren't done through MRs) that is uploaded to GitLab as an artifact
docker rm ... | In each step that you need to continue even if the step fails, you can add a flag to your .gitlab-ci.yml file in that step. For example:
...
Unit Tests:
stage: tests
only:
- branches
allow_failure: true
script:
- ...
It's that allow_failure: true flag that will continue the pipeline even if that specif... | GitLab | 59,180,675 | 71 |
GitLab is a free, open-source way to host private .git repositories but it does not seem to work with Go. When you create a project it generates a URL of the form:
git@1.2.3.4:private-developers/project.git
where:
1.2.3.4 is the IP address of the gitlab server
private-developers is a user group which has access to th... | Run this command:
git config --global url."git@1.2.3.4:".insteadOf "https://1.2.3.4/"
Assuming you have the correct privileges to git clone the repository, this will make go get work for all repos on server 1.2.3.4.
I tested this with go version 1.6.2, 1.8, and 1.9.1.
| GitLab | 29,707,689 | 68 |
I'm new to source control; in the past, I've manually backed up copies of files and made changes on clones then transferred changes manually to master files once debugged. I realize this is similar to how branches work with Git repositories, however I've never used one.
I downloaded Git and made an account on GitLab, a... | To register a project as a local Git repository the first thing you need to do is perform the following command at your project root:
git init
This will create a .git folder at your project root and will allow you to start using Git in that repository.
If you want to "push" your local Git repository to a remote Git s... | GitLab | 36,132,956 | 68 |
In my Gitlab CI, I have a stage that triggers another stage by api call trigger and I want to pass the current branch name as parameter to the other project holding the trigger. I used the CI_COMMIT_REF_NAME for this, it seemed to work, but now that I call the stage only when merging the branch to master, the CI_COMMI... | I'm not sure what you mean by “a stage that triggers another stage by api call trigger”. But, generally speaking, GitLab CI jobs are part of a CI pipeline, and CI pipelines are created for a branch or tag.
The CI_COMMIT_REF_NAME variable contains the name of the branch or tag that the pipeline was created for.
The CI_M... | GitLab | 52,169,219 | 67 |
I would like to setup my project_dev CI only for 3 branches and specific kind of tags like: dev_1.0, dev_1.1, dev_1.2.
How can I achieve that?
This is what I have now:
project_dev:
stage: dev
script:
- export
- bundle exec pod repo update
- bundle exec pod install
- bundle exec fastlane crashlytics... | Sounds like a regular expression question. I just created a project on gitlab.com for the regular expression.
File: .gitlab-ci.yml
project_dev:
# Irrelevant keys is skipped
script:
- echo "Hello World"
only:
- develop
- release
- master
- /^dev_[0-9]+(?:.[0-9]+)+$/ # regular expression
I was ... | GitLab | 52,830,653 | 67 |
Is it possible to have gitlab set up to automatically sync (mirror) a repository hosted at another location?
At the moment, the easiest way I know of doing this involves manually pushing to the two (gitlab and the other) repository, but this is time consuming and error prone.
The greatest problem is that a mirror can r... | Update Dec 2016: Mirroring is suported with GitLAb EE 8.2+: see "Repository mirroring".
As commented by Xiaodong Qi:
This answer can be simplified without using any command lines (just set it up on Gitlab repo management interface)
Original answer (January 2013)
If your remote mirror repo is a bare repo, then you ca... | GitLab | 14,288,288 | 66 |
I have just installed GitLab.
I created a project called project-x.
I have created few users and assigned it to the project.
Now I tried to clone:
git clone git@192.168.0.108:project-x.git
It prompted me for a password.
What password should I use?
| Not strictly related to the current scenario. Sometimes when you are prompted for password, it is because you added the wrong* origin format (HTTPS instead of SSH)
HTTP(S) protocol is commonly used for public repos with strong username+pass
SSH authentication is more common for internal projects where you can authentic... | GitLab | 15,495,843 | 66 |
I worked on github and integrated it to sourcetree (MAC version) for one of my project. I would like to use sourcetree for GITLAB. But I am not able to add remote of gitlab to source tree. In Repository settings, Only I can see host type as "unknown", "bitbucket", "github" & "stash". I used unknown but it won't help me... | This worked for me,
Step 1: Click on + New Repository> Clone from URL
Step 2: In Source URL provide URL followed by your user name,
Example:
GitLab Repo URL : http://git.zaid-labs.info/zaid/iosapp.git
GitLab User Name : zaid.pathan
So final URL should be http://zaid.pathan@git.zaid-labs.info/zaid/iosapp.git
Note: zai... | GitLab | 27,570,370 | 64 |
Recently I've found three concepts of a workflow in Git:
GitFlow
GitHub Flow
GitLab Flow
I've read the nice articles about it but I don't understand GitLab Flow very well.
Briefly.
GitFlow
We've a master branch as a production branch. Also we have a develop branch where every developer merges his features. Sometimes... | It has been a year now since this post was raised, but considering future readers and the fact things have changed a bit I think it's worth refreshing.
GitHub Flow as originally depicted by Scott Chacon in 2011 assumed each change once reviewed on a feature branch and merged into master should be deployed to production... | GitLab | 39,917,843 | 64 |
I've just started using GitLab, and have created a set of issues, in order to keep an overview of what needs to be done for my application. I was wondering if it was possible to create a branch from these issues, such that the branch and issues are linked, similar as in jira and Stash from atlassian?
| If you create a branch with the name <issue-number>-issue-description and push that branch to gitlab, it will automatically be linked to that issue. For instance, if you have an issue with id 654 and you create a branch with name 654-some-feature and push it to gitlab, it will be linked to issue 654.
Gitlab will even a... | GitLab | 43,295,151 | 64 |
I'm trying to connect to a GitLab repository using the I/O preview of Android Studio. Does anyone know how to do this/if it is possible yet?
| How to add an Android Studio project to GitLab
This answer shows how to do it using the Android Studio GUI.
1. Create a new project on GitLab
Chose the + button on the menu bar. Add a project name and then click "Create project".
This will give you a new project address. Choose the https version.
It will look somethi... | GitLab | 16,677,931 | 63 |
I have accounts in GitHub and GitLab. I generated and added an RSA key to my account in GitLab, but now I need to work with GitHub on a second project.
I know that GitLab and GitHub both use git. Please tell me if it's possible to use GitHub and GitLab on one machine?
| Yes you can, you can share the same key between them both (ssh key) or create a new one per git server.
Create a SSH config file
When you have multiple identity files(in your case one for gitlab and one for github) , create a SSH config file to store your various identities.
The format for the alias entries use in t... | GitLab | 40,549,348 | 63 |
After I switched from HTTPS to SSH for my repo then I received this error when pushing to origin master:
ssh: Could not resolve hostname git: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I also add my ssh in the ... | I was getting the same error.
This error typically occurs when there is an issue with the SSH configuration or the Git remote repository's hostname cannot be resolved.
Here, you can check your remote by running:
git remote -v
There are few reasons why this error occurs:
Incorrect Hostname
SSH Configuration
Network ... | GitLab | 53,129,706 | 63 |
I use GitLab Community Edition 9.1.3 2e4e522 on Windows 10 Pro x64. With Git client.
Error
Cloning into 'project_name'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://my_user_name@example.com/my_user_name/project_name.git/'
How to fix it?
| Open CMD (Run as administrator)
type command:
git config --system --unset credential.helper
then enter new password for Git remote server.
| GitLab | 44,514,728 | 61 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.