Am using Ubuntu system.In windows i can easy to add code in to BitBucket using source tree.But in Ubuntu i need to use TortoiseHg.I have created new repository and all but when am trying to add my path it showing 404 error?
How can i add project in to BItBucket?
Please provide step by step procedure.
try this:
1.Create repository in bit bucket
open your terminal and follow this step
1.cd /path/to/your/repo
2.sudo apt-get install git
3.if git exists then-> rmdir .git/
4.git init
5.git remote add origin https://username#bitbucket.org/your user name/your repository.git
6.git add .
7.git commit -am "first commit"
8.git push -u origin master
9.then enter your user name hit enter then enter password
Related
I made a custom rom for my device using Resurrection Remix Nougat. However, the security patch of the rom is December 5, 2017. I've found a guide that gives instructions (https://thealaskalinuxuser.wordpress.com/2016/08/29/how-to-manually-update-your-custom-rom-source-code-with-security-updates/) but it says to manually edit the files, even though there are commit codes on the pages (ex: https://android.googlesource.com/platform/frameworks/base/+/4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5)
Is there a way to add these commits using 'git cherry-pick' or something else without manually editing the files?
I have tried the following (with this example: https://android.googlesource.com/platform/frameworks/base/+/4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5)
go to frameworks/base using 'cd frameworks/base'
'git fetch https://android.googlesource.com/platform/frameworks/base'
'git cherry-pick 4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5
After running the chery-pick command, I get this:
fatal: bad object 4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5
Try:
git fetch https://android.googlesource.com/platform/frameworks/base 4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5 --depth 2
git cherry-pick 4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5
And here's another method. Press the button diff on the page of https://android.googlesource.com/platform/frameworks/base/+/4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5, and the diff/patch of the commit is displayed, which starts with the line
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
You can copy and paste the diff into a local file, foo.diff for example, and run
git apply foo.diff
'go to frameworks/base using 'cd frameworks/base'
'git fetch https://android.googlesource.com/platform/frameworks/base' -A
'git cherry-pick 4afa0352d6c1046f9e9b67fbf0011bcd751fcbb5
I can add my projects to one github account but with another account i can't. I have followed this website for GitHub and worked fine: https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/#comment-32683
Steps are: 1. create a new git repo. 2. from android studio- VCS> Import into version control> create git repo. 3. In windows root directory of project open bash command and type > git remote add origin https://github.com/xxx/myProject.git 4. then back to android studio and a)project>Git>add b)project>Git>Commit c) project>Git>repository>push
these steps worked fine and I get a successful message using one github account. But with another account i cant do it, i get the erro:
Failed with error: fatal: unable to access 'https://github.com/Rashedul/myProject.git/': The requested URL returned error: 403
Why is this happening and how to solve it?
First you should set username and password to access the URL and to login , set Authentication first.
git remote set-url origin https://yourusername#github.com/user/repo.git
Then you'll be asked for a password when trying to git push
This is on the http authentication format. You could set a password also:
https://youruser:password#github.com/user/repo.git
You should be aware that if you do this, your github password will be stored in plaintext in your .git directory, which is obviously undesirable.
I'm getting this GitHub error in android studio whenever I'm creating a new repository , And I'm not having any GitHub repo. of the same name.
goto Terminal in android studio and type below command –
git remote rm github
Open to Android Studio > VCS > Git > Remotes Delete all the addresses that will appear in this section. The problem will solve.
Android studio->Git->Manage Remotes...
And delet all from there with -
Tried it.....
Step1. Git-2.11.0-64-bit.exe Setup.
Step2: Git Bash -> git config --global user.name "your userName",
git config --global user.email "your email".
Step3: Android studio->File->Settings->GitHub-> login "your email"
Password "your password" -> test
Step4: VCS->import into version control->share Project.
Step 5: Successful.\
Git $ git remote rename
New repository name: eDiot1
Remote name github1
I was changed user for github in Android studio and trying to pushing code in repository but its getting error.
Repository successfully creating and commit also but in pushing time getting error.
F:\....>git push -u origin master
remote: Permission to abc.in/abc.git denied to olduser.
fatal: unable to access 'https://..../abc.git/': The requested URL returned error: 403
I also tried new project, but still getting old user name denied access error.
Why don't you push using Android Studio?
Have you got write permission on remote for new user?
Did you changed user in repo too? I think that you still have old data. Check it in project directory
git config user.name
git config user.email
You can check this trick
edit .git/config file under your repo directory
find url=entry under section [remote "origin"]
change it from
url=https://your_user_name#github.com/yy/repo_name.git
to
url=ssh://git#github.com/your_user_name/repo_name.git.
Alternatively
Create new repo in your remote server <- can be skipped
Remove existing git remote from local project
git remote rm origin
Add new remote
git remote add origin https://github.com/your_user_name/repo.git
I have no more idea :)
I am completely new to Github...
I have been learning Android from udacity and I cloned one of the forks from the public repository.
Now, I want to create my own private repository and push the files to it but it always tries to push them to the udacity repository instead of mine.
Here are the commands I used:
git remote add origin <my_git_url>
git add .
git commit -m "First Commit"
git push origin master
But it just keeps returning this:
remote: Permission to udacity/Sunshine-Version-2.git denied to xxxx.
fatal: unable to access 'https://github.com/udacity/Sunshine-Version-2.git/': The requested URL returned error: 403
Please help....
The error says you don't have rights to push there.
Most probably, you have to fix your repository url.
git remote remove origin
git remote add origin https://github.com/your-username/your-repository
git push origin master
Then it will ask you to provide the credentials. Later you can get rid of that using SSH urls. Here is a nice article on how to get started using SSH keys.